MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Free

Method Free

code/qcommon/hstring.cpp:144–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144void CMapPoolLow::Free(void *p)
145{
146 // Validate that someone isn't trying to double free this node and also
147 // that the end marker is intact.
148 assert(((SMapNode *)p)->mTag==MAPNODE_INUSE);
149 assert((((SMapNode *)p)->mMapBlockNum)>=0);
150 assert((((SMapNode *)p)->mMapBlockNum)<256);
151 assert((((SMapNode *)p)->mMapBlockNum)<=mLastBlockNum);
152 assert(mMapBlocks[((SMapNode *)p)->mMapBlockNum]->bOwnsNode(p));
153
154 // Ok, mark the the node as free.
155 ((SMapNode *)p)->mTag=MAPNODE_FREE;
156
157 // Add a new freelist entry to point at this node.
158 mFreeList.push_back(p);
159}
160
161void CMapPoolLow::TouchMem()
162{

Callers 2

deallocateMethod · 0.45
FreeFunction · 0.45

Calls 2

bOwnsNodeMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected