some malloc.c related fixes