BUG? Used Zone Memory

Nathan Cournia cournia at gmail.com
Tue Jan 17 17:17:42 EST 2006


Hi,

I just started looking though the Q3A source and think I may have
found a possible bug.

In Z_ClearZone, zone->used is set to 0 while zone->size is set to size
(the number of bytes malloc'd  from the OS).  It seems to me that
zone->used should initially be set to sizeof(memzone_t), as the first
part of the memory zone is dedicated to the memzone_t struct.

BTW I don't think that setting zone->used to 0 has any serious ill
effects, other than Z_AvailableZoneMemory will be sizeof(memzone_t)
bytes off.

Any thoughts?

nathan



More information about the quake3 mailing list