On Thu, 28 Jun 2007 02:43:45 -0400 [EMAIL PROTECTED] wrote: >After looking at code, best thing to **NOT** do away with >GeneralBuffer. (displaybuffer). >Reason is there are ~628 calls to load into this buffer. >Now we have 1 malloc, and 1 free, so that is tons less malloc/free > >calls we no have to worry about. > >In hunt for memory leaks, I know now is not present in those >routines that use this. So no more changes to that is best until >find other leaks. >
Should not post so late at night. ;) I read my logs backwards. Sorry. GeneralBuffer is use for .gam/bjo/map/ttp files, and so on. It *not* use for wrf/pie/vlo/slo/txt/lev files ... confusion was because the routine that load these resLoad() in frameresource.c has, pFileBuffer = pLoadBuffer; fileBufferSize = bufferSize; These point to GeneralBuffer & GeneralBufferSize, **BUT** they are not even use!! BOOL resLoad(const char *pResFile, SDWORD blockID, char *pLoadBuffer, SDWORD bufferSize) Should be then BOOL resLoad(const char *pResFile, SDWORD blockID) resLoad uses own local buffer pointer, and free it when done, or we can change to really use GeneralBuffer & GeneralBufferSize. well, it late. night. :) -- Click for special offer on replacement windows - energy efficient http://tagline.hushmail.com/fc/Ioyw6h4eNoT7eVpHUQALGfy7Dxf6bWPdi9wHyY5blvYI2V204itD58/ _______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev