linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "qhwang" <qhwang@ieeta.pt>
To: linux-c-programming@vger.kernel.org
Subject: help on memory problem
Date: Tue, 7 Oct 2003 23:43:04 +0100	[thread overview]
Message-ID: <004401c38d24$5f52b220$70ab88c1@ieeta.pt> (raw)

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


             reply	other threads:[~2003-10-07 22:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-07 22:43 qhwang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-07 22:57 help on memory problem Sandro Dangui
2003-10-08  7:26 ` ronkhu

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='004401c38d24$5f52b220$70ab88c1@ieeta.pt' \
    --to=qhwang@ieeta.pt \
    --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).