#include #include #include #include "malloc.h" int main(void) { char *s; /* size of header is 16 bytes so the mem space should * be atleast 16 * 2 = 32 bytes to call bfree */ s = malloc(32); bfree(s, 32); s = my_malloc(11); strcpy(s, "just werks"); printf("%s\n", s); /* ||-16:HEADER-||||-16:FREE-|| */ my_free(s); free(s - 16); return 0; }