Lines Matching refs:memptr
147 static MemoryBlockHeader * DMem_VerifyBlock(void * memptr) {
152 DASSERTMSG( DMem_ClientCheckPtr(memptr, 1), "Invalid pointer");
155 header = (MemoryBlockHeader *)((byte_t *)memptr - sizeof(MemoryBlockHeader));
158 DASSERTMSG( DMem_ClientCheckPtr(memptr, DMEM_MIN(MAX_CHECK_BYTES,header->size)), "Block memory invalid" );
162 tail = (MemoryBlockTail *) ( (byte_t *)memptr + header->size );
168 static MemoryBlockHeader * DMem_GetHeader(void * memptr) {
169 MemoryBlockHeader * header = DMem_VerifyBlock(memptr);
202 byte_t * memptr = NULL;
236 memptr = (byte_t *)header + sizeof(MemoryBlockHeader);
237 memset(memptr, ByteInited, size);
241 tail = (MemoryBlockTail *)(memptr + size);
246 return memptr;
252 void DMem_FreeBlock(void * memptr) {
256 if ( memptr == NULL) {
261 header = DMem_GetHeader(memptr);
263 memset(memptr, ByteFreed, header->size);