dynamic memory allocation
4 posters
Page 1 of 1
dynamic memory allocation
how delete knows how much memory to free
mnnit.rahul- Posts : 51
Join date : 2009-02-01
Re: dynamic memory allocation
When we pass bass address to delete,there is hidden data structure which connect every memory block ,so that it will delete all...
Chunks- Posts : 5
Join date : 2009-02-02
Re: dynamic memory allocation
Malloc maintains a table entry for every memory allocated. So when delete/ free operator is called on an object, it checks that table entry corresponding to that object for which delete/free has been invoked. That's how delete knows how many bytes to delete.
Beagle- Posts : 40
Join date : 2009-01-30
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|