Setting the first two bytes of a block of memory
- by idealistikz
Suppose I have a block of memory as such:
void *block = malloc(sizeof(void *) + size);
How do I set the first two bytes of the block as NULL or have it point somewhere? I do not want to simply assign 'block' to NULL or to another pointer because I want to access the rest of the memory I malloc'ed.