by warmi » Jan 24, 2004 @ 3:54am
"Do you have any evidence pointing to less efficient heap management on the PPC? "
Well, when writing ZRaid the game was experiencing unexplained slow-downs only on my PPC devices ( on a desktop was working fine.)
I spent hours trying to figure that one out - there was plenty of memory available , everything seemed to be running fine until a certain point where things would just slow down for no apparent reason...
Eventually I tracked it down to a heap management issues. While having couple hundred allocated memory blocks meant nothing on my PC , it was literally killing my Ipaq.
I was using QList and QVector all over the place and reimplementing new/delete to use chunked allocation (1000 or so nodes at a time) fixed everything.
" Nothing prevents you from explictely using a std::Vector<void*> to store objects."
No as safe as Vector<foo>.
Don't get me wrong. I use STL-like library all the time- in fact, I can't imagine writing code without this sort of basic library anymore - it is just STL was designed as a full featured, complete solution rather than a lean and efficient library – something that one would prefer in low-memory/slower devices.