mockers
Would you like to react to this message? Create an account in a few clicks or log in to continue.

dynamic memory allocation

4 posters

Go down

dynamic memory allocation Empty dynamic memory allocation

Post  mnnit.rahul Tue Feb 03, 2009 3:25 am

how delete knows how much memory to free

mnnit.rahul

Posts : 51
Join date : 2009-02-01

Back to top Go down

dynamic memory allocation Empty Re: dynamic memory allocation

Post  Chunks Thu Feb 12, 2009 12:58 am

When we pass bass address to delete,there is hidden data structure which connect every memory block ,so that it will delete all... albino

Chunks

Posts : 5
Join date : 2009-02-02

Back to top Go down

dynamic memory allocation Empty Re: dynamic memory allocation

Post  Admin Thu Feb 12, 2009 1:58 am

can anyone explain further?

Admin
Admin

Posts : 47
Join date : 2009-01-29

https://mockers.forumotion.com

Back to top Go down

dynamic memory allocation Empty Re: dynamic memory allocation

Post  Beagle Mon Feb 16, 2009 1:21 pm

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

Back to top Go down

dynamic memory allocation Empty Re: dynamic memory allocation

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum