c - What exactly does Valgrind take in to account when giving the number of allocations? -


i'm recoding c/c++ malloc function linux usage only. 1 of challenges of exercise make function close original malloc possible.

i use valgrind check if mallocs correctly allowed , freed, don't know if valgrind can pick other form of memory allocation, , if so, ones?

second question: assuming valgrind doesn't pick other forms of memory allocation, else use check if function working intended?

valgrind assumes malloc work expected in order manage memory allocation. if goal make own malloc implementation, cannot use valgrind debug it.

this 1 of challenge of exercise: have debug yourself.

if want check if function works intended, code function show_alloc_mem dumps memory , check if displayed intended.


Comments