3 ms·
What STL implementation are you using that's making so many tiny allocations? Could you give some more detail about what operations trigger the allocating? Admi
by dataangel 19y ago
What STL implementation are you using that's making so many tiny allocations? Could you give some more detail about what operations trigger the allocating? Admittedly, I haven't tried writing a game engine in C++ yet, but I do write a lot of plot rendering code, and I try to keep my rendering loops "read only," so if STL containers are used, only const member functions are called. Retrieving a member from a vector for example, shouldn't involve any allocations on the heap.
Unless you're counting stack too. I could see STL implementations combined with a compiler poor at inlining resulting in a lot of extra call depth.
Edit: Also, if the original poster is mostly using C++ due to the platform (I don't know what Symbian supports) it's unlikely he has the same sort of performance requirements you do. Most applications don't need to worry about 128-byte allocations.
- palish 19y agoOur compiler is Visual Studio 2005. John Ratcliff would know the details... He's spent about a month implementing detailed memory tracking and statistics. A big culprit is our pervasive use of std::string, but every other container also contributes.