Reputation: 1519
I was wondering if someone could clarify the following: if I'm not mistaken fd is a pointer to the next malloc_chunk structure in the bin but I've also seen it specified as a pointer to the fd field in the malloc_chunk structure. So does it point to the beginning of the malloc_chunk struct or the fd field in the struct?
Upvotes: 1
Views: 318
Reputation: 1242
It's type is a struct malloc_chunk *
, so it should point to a malloc_chunk structure, the next one. If it pointed to the fd field, it would be a pointer to a pointer to a pointer, ...., which could be stored as a void *
Upvotes: 1