This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: save heap contents
- From: "R S" <rusingh at ecs dot umass dot edu>
- To: <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 30 Nov 2005 08:49:41 -0000
- Subject: [ECOS] Re: save heap contents
To add to my previous question, one way of doing it is using sbrk(0) to locate
current heap pointer at any time and use it to copy the heap contents ,
however as memory is sbrked only once in eCos (dlmalloc impl), this is not
possible. So I am looking at alternate ways to accomplish the heap copy(that
is currently in use).
Will appreciate your inputs.
R S <rusingh@ecs.umass.edu> said:
>
> As part of my application, I need to save the contents of heap, so I can at
> any point later restore the heap to its previous state.
> Using mallinfo , I can get heap usage but inorder to copy its contents , I
> would need the exact memory address of used blocks and their corresponding
sizes.
> I don't want to copy the entire heap as it might be too large. What would be
> the best way of acheiving this.?
> Any ideas in the direction will be highly appreciated.
> Thanks in advance.
>
>
--
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss