Changeset 6148 for trunk/ppImage/src/ppImage.c
- Timestamp:
- Jan 21, 2006, 5:29:19 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImage.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImage.c
r6114 r6148 1 1 #include "ppImage.h" 2 3 psMemId ppMemAlloc(const psMemBlock *ptr) 4 { 5 psLogMsg(__func__, PS_LOG_INFO, 6 "Allocated memory block %d: %ld references\n" 7 "\tFile %s, line %d, size %d\n" 8 "\tPosts: %lx %lx %lx\n" 9 "\tLast operation: %s:%d\n", 10 ptr->id, ptr->refCounter, ptr->file, ptr->lineno, ptr->userMemorySize, ptr->startblock, 11 ptr->endblock, *(void**)((int8_t *)(ptr + 1) + ptr->userMemorySize), 12 ptr->lastopFile, ptr->lastopLine); 13 return 0; 14 } 15 16 psMemId ppMemFree(const psMemBlock *ptr) 17 { 18 psLogMsg(__func__, PS_LOG_INFO, 19 "Freed memory block %d: %ld references\n" 20 "\tFile %s, line %d, size %d\n" 21 "\tPosts: %lx %lx %lx\n" 22 "\tLast operation: %s:%d\n", 23 ptr->id, ptr->refCounter-1, ptr->file, ptr->lineno, ptr->userMemorySize, ptr->startblock, 24 ptr->endblock, *(void**)((int8_t *)(ptr + 1) + ptr->userMemorySize), 25 ptr->lastopFile, ptr->lastopLine); 26 return 0; 27 } 28 2 29 3 30 int main(int argc, char **argv) 4 31 { 32 #if 0 33 psMemAllocCallbackSet(ppMemAlloc); 34 psMemFreeCallbackSet(ppMemFree); 35 // psMemAllocCallbackSetID(6967); 36 // psMemFreeCallbackSetID(6967); 37 psMemAllocCallbackSetID(51804); 38 psMemFreeCallbackSetID(51804); 39 #endif 5 40 6 41 ppData data;
Note:
See TracChangeset
for help on using the changeset viewer.
