replace some hand-coded functions with their libc equivalent
replace hand-coded calloc with libc calloc
prevent useless zeroing after mmap on OSs giving already zero-filled pages