Setting the first two bytes of a block of memory as a pointer or NULL while still accessing the rest
- 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 to a pointer or NULL while still being able to access the rest of the block of memory? For this reason, I do not want to simply assign 'block' to another pointer or NULL.