[ECOS] Critical memory usage cause application keep reboot?

wang cui iucgnaw@msn.com
Tue Feb 13 10:32:00 GMT 2007


Thanks!

>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, 
malloc_info.maxfree);
>    }
>
>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 
11-336
>Visit us at Embedded World 2007, Nürnberg, Germany, 13-15 Feb, Stand 11-336

_________________________________________________________________
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger:  http://messenger.msn.com/cn  


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list