One entry of the start-up zone list.
Definition zone.h:60
int mSizeKb
Definition zone.h:62
const char * mName
Definition zone.h:61
One named region the allocator hands blocks out of.
Definition zone.h:28
char * mCur
Definition zone.h:31
void * mBlock
Definition zone.h:29
int mSize
Definition zone.h:32
char * mStart
Definition zone.h:30
char mName[kZoneNameSize]
Definition zone.h:33
int ZoneGetAvail(int nDefault)
Report the space left in the selected zone.
void ZoneSetCurrent(int nZone)
Select the zone that ZoneAlloc() allocates from.
constexpr int kZoneNameSize
The number of bytes a zone name may occupy, including the terminator.
Definition zone.h:12
void ZoneDelete(int nZone)
Release one zone and free its table slot.
void InitializeZoneList()
Create every zone on the start-up list.
void FreeAllZones()
Release every zone and clear the table.
void ZoneResetZone(int nZone)
Rewind one zone, discarding everything allocated from it.
void ZoneReset()
Rewind the selected zone, discarding everything allocated from it.
ZoneConfig g_aZoneConfigs[]
The start-up zone list, terminated by an entry with a null name.
void * ZoneGrabTemp(int nSize)
Take the shared temporary buffer.
int ZoneCreate(const char *pszName, int nSize)
Create a named zone.
void * ZoneAlloc(unsigned nSize)
Allocate from the current zone.
constexpr int kZoneCount
The number of zones the allocator can create at once.
Definition zone.h:9
constexpr int kNoZone
Reported in place of a zone index when no zone applies.
Definition zone.h:15
void ReleaseAllZoneSlots()
Release every zone one slot at a time.
int FindZoneByName(const char *pszName)
Find a zone by name.
void ZoneDump()
Write every occupied zone to the log.
void ZoneReleaseTemp()
Give the shared temporary buffer back.
int FindZoneForPointer(const void *pBlock)
Find the zone a block belongs to.
void ZoneInit(int nEnabled)
Turn zone allocation on or off.
void ZoneFree(void *pBlock)
Release a block that ZoneAlloc() returned.
Zone zoneDescs[kZoneCount]
The zone table.
int ZoneGetCurrent()
Report the selected zone.