bpf 实现支持热插拔的内存泄露检测

This commit is contained in:
1iaan
2026-01-27 13:57:37 +00:00
parent c99867b342
commit 226f9a510f
4 changed files with 38 additions and 2 deletions

View File

@@ -84,7 +84,7 @@ void *nMalloc(size_t size, const char * filename, const char *func, int line){
return NULL;
}
fprintf(fp, "[+] [%s : %s : %d] %p: %ld malloc\n", filename, func, line, ptr, size);
fprintf(fp, "[+] [%s:%d:%s] [%p:%ld]\n", filename, line, func, ptr, size);
fflush(fp);
fclose(fp);