The staff implementation gives this 9957 HEAP SUMMARY 9957 in use at exit 0 bytes in 0 blocks 9957 total heap usage 223 allocs , 223 frees , 1 , 630 , 733 bytes allocated 9957 9957 All heap blocks were freed no leaks are possible 9957 9957 For counts of detected and suppressed errors , rerun with v 9957 ERROR SUMMARY 0 errors from 0 contexts suppressed 0 from 0 Which is still 4 x as much as yours , but ~ 720 times smaller than mine ! I ' ve done make clean and rerun my code through valgrind several times now and I keep getting the same result . Maybe its to do with the way my load function is implemented ? If I PM you my entire server . c code would you mind running valgrind on it at your end to compare results ?