Lines Matching refs:ptr
32 static void PrintBinary(u8* ptr, int len);
53 void* ptr; in MyAlloc() local
55 ptr = OS_Alloc(size+4); in MyAlloc()
56 *(u32*)ptr = size; in MyAlloc()
57 (u8*)ptr += 4; in MyAlloc()
59 OS_TPrintf("Allocate %d bytes from %p: total %d bytes\n", size, ptr, total_allocated_size); in MyAlloc()
61 ptr = OS_Alloc(size); in MyAlloc()
63 return ptr; in MyAlloc()
71 static void MyFree(void* ptr) in MyFree() argument
75 (u8*)ptr -= 4; in MyFree()
76 size = *(u32*)ptr; in MyFree()
78 OS_TPrintf("Free %d bytes from %p: total %d bytes\n", size, ptr, total_allocated_size); in MyFree()
80 OS_Free(ptr); in MyFree()
392 static void PrintBinary(u8* ptr, int len) in PrintBinary() argument
402 OS_TPrintf("%02x", ptr[i]); in PrintBinary()
405 #pragma unused(ptr,len) in PrintBinary()