This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
malloc_info.maxfree);From: Bart Veer <bartv@ecoscentric.com> To: iucgnaw@msn.com CC: ecos-discuss@sourceware.org Subject: Re: [ECOS] Critical memory usage cause application keep reboot? Date: 13 Feb 2007 10:30:01 +0000
>>>>> " " == wang cui <iucgnaw@msn.com> writes:
> As I try MicroWindow demo with VNC, my program keep reboot > after run for a while. Finally I found the memory usage is too > critical, the BSS region almost touch top of RAM region. After > I reduced some memory configuration, it works.
> Because it can't be found at compile time. So I am asking, is > there a good way to detect this kind of potential problem?
mallinfo() provides some very basic information about heap usage, and it can be useful to call this from your application at regular intervals. e.g.
#include <stdlib.h>
...
{
struct mallinfo malloc_info = mallinfo();
diag_printf(" malloc info: allocated %d, free %d, maxfree %d\n",
malloc_info.uordblks, malloc_info.fordblks,
}11-336
eCosPro has added functionality for more advanced heap analysis, e.g. tracking down memory leaks. See http://www.ecoscentric.com/ecospro/doc/html/ref/memalloc.html for more details. This is not currently available in the anoncvs version.
Bart
--
Bart Veer eCos Configuration Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
Besuchen Sie uns vom 13.-15.02.07 auf der Embedded World 2007, Stand
Visit us at Embedded World 2007, N?nberg, Germany, 13-15 Feb, Stand 11-336
-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |