free.c

来自「minimal python variant for small footpri」· C语言 代码 · 共 25 行

C
25
字号
#include "config.h"#include <stdlib.h>#include <PalmOS.h>#include <PalmCompatibility.h>#include <stdio.h>#ifndef USE_DLMALLOCextern long malloc_ref_count;extern long bytes_deallocated;void free( void *ptr ){     size_t size = MemPtrSize(ptr);     Err res = MemPtrFree(ptr);     if (res) 	  printf("free: error freeing memory = %d\n", res);          malloc_ref_count--;     bytes_deallocated += size;     DUMP_TO_HOST("d", ptr, size);	}#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?