From: ronkhu <ronkhu@ntsp.nec.co.jp>
To: linux-c-programming@vger.kernel.org
Subject: Re: help on memory problem
Date: Wed, 08 Oct 2003 15:26:48 +0800 [thread overview]
Message-ID: <3F83BC38.2080508@hq.ntsp.nec.co.jp> (raw)
In-Reply-To: 31E38B53D182D51195FA00508BE3A33402CD20A5@zwnbc004.cala.nortel.com
How about the clean up for the data structures that have been allocated?
can u send us some code snippet....
-Ron
Sandro Dangui wrote:
>Do you have recursive calls?
>If you alloc all memory you need in the beginning, then the only problem
>that I can figure is that you have an infinite recursive call... or a loop
>between calls. It may be causing a stack overflow.
>
>
>-----Original Message-----
>From: qhwang [mailto:qhwang@ieeta.pt]
>Sent: terça-feira, 7 de outubro de 2003 19:43
>To: linux-c-programming@vger.kernel.org
>Subject: help on memory problem
>
>
>Hi there,
>
>Can anyone help me to get out of the mess, please? I am writing a program
>which tries to detect faces inside an image. For further comparison, now I
>use the "brutal force search" strategy which means there is a window (here
>32x32) scanning the input image (e.g., 160x120) pixel by pixel. The problem
>is, this "brutal forace search" uses quite a lot memory and it's always
>killed by the system after running a while. At first I think there are some
>memory leaks but I could not find any when I set the macro MALLOC_CHECK_=1.
>I also modify the code to make sure all the data structure are only
>allocated once, e.g., in the main program, but the problem is still there.
>When I use "top" to monitor the memory infor when the program is running and
>find that the option "SIZE" reaches more than 250 MB and "RSS" reaches 40
>MB. My program is only about 110 KB. The memory of my computer is only 64 MB
>but with my laptop (256 MB) the problem is same. Can anybody give me some
>pointers about it?
>
>Many thanks.
>
>QingHua
>
>-
>To unsubscribe from this list: send the line "unsubscribe
>linux-c-programming" in the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>-
>To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
>
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2003-10-08 7:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-07 22:57 help on memory problem Sandro Dangui
2003-10-08 7:26 ` ronkhu [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-10-07 22:43 qhwang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F83BC38.2080508@hq.ntsp.nec.co.jp \
--to=ronkhu@ntsp.nec.co.jp \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).