Question: What happens when freeing a pointer which has already been freed? The allocator will set a special double - free bit in the status buffer
What happens when freeing a pointer which has already been freed?
The allocator will set a special doublefree bit in the status buffer which can be checked by the program
The pointer may or may not have been reinitialized, but that doesn't matter, it'll still try to free it The pointer may have been reinitialized, in which case it dogs nothing since it wouldn't want to remove memory in use Nothing, C keeps track of which pointers have been freed already
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
