Hi, It seems to me that the code in mem_align.c is a bit buggy, shouldn't it be: if (!alignment) { /* We have not to satisfy any alignment */ if ((mem_ptr = (uint8_t *) malloc(size + 1)) != NULL) { /* Store (mem_ptr - "real allocated memory") in *(mem_ptr-1) */ *mem_ptr = 1; printf("\nI am here\n"); /* Return the mem_ptr pointer */ return (void *) ++mem_ptr; }