0

free(ptr); Even though we are just proving ptr, How it assumes exact size of memory allocated first to be freed?

How exactly it deletes whole allocated structure ?

12th Oct 2018, 8:37 PM
TheEngineerIN
TheEngineerIN - avatar
1 Resposta
0
During malloc, some of the storage grabbed is used internally to maintain system depended information including the size before handing the rest of it back as the function return.
12th Oct 2018, 9:06 PM
John Wells
John Wells - avatar