Am Donnerstag, 28. Dezember 2006 16:52 schrieb Christian Ohm: > On Thursday, 28 December 2006 at 15:37, Troman wrote: > > The issue of MALLOC was already raised in some of the previous > > messages, and there seems to be something wrong with those MALLOC/FREE > > macros. I noticed a memory leak in the scripting engine, to find out > > what is actually causing it I set up a (script) loop with 10k > > iterations with nothing but a string assignment in the loop body. > > > > Due to the nature of this loop the interpreter was pushing > > string/non-string data to the stack interchangeably, hence > > allocation/deallocationg memory for strings. The memory usage went up > > by ~3mb after each 10k iterations. I couldn't stumble upon any flaws > > in the code, looks like MALLOC/FREE are causing this. Anyway, after > > replacng MALLOC/FREE with malloc/free the memory leak is gone. > > > > Apart from that I noticed WZ memory usage is increasing by about 35 mb > > each time a skirmish game is restarted, it wouldn't surprise me if it > > was due to MALLOC/FREE anomalies. Do we actually have to rely on > > those two, ar would it make sense to simply replace them with > > malloc/free? I remember someone (I think Per) was trying to rewrite > > some functionality that dealt with wz memory usage that turned out to > > be a non-trivial task, I hope it is not related to MALLOC/FREE. I think not too long ago Per said something like simply replacing MALLOC was not possible... Dunno if I remember that correctly or how his patch fixed that...
--Dennis
pgpOABr7X9Sg6.pgp
Description: PGP signature
_______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev