| 142 | } |
| 143 | |
| 144 | void 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 | |
| 161 | void CMapPoolLow::TouchMem() |
| 162 | { |
no test coverage detected