From: Dawid Toton <d0@wp.pl>
To: caml-list@yquem.inria.fr
Subject: Memory leak & slowdown
Date: Fri, 05 Jun 2009 16:00:01 +0200 [thread overview]
Message-ID: <4A2924E1.50307@wp.pl> (raw)
I have an OCaml program using GTK running on Windows, using multiple
threads.
The overall memory usage grows significantly over time, but I don't know
why. After it consumes several MB extra, it slows considerably and
becomes unusable, so I have to fix this.
Is it possible that this is related to GC compaction being turned off?
Additional calls to Gc.compact seemingly don't help.
The memory usage grows only when the main processing loop is working.
After the function exists, the memory is not freed. Moreover, if I start
it again, it 'reuses' the leaked memory. The second execution of the
loop takes more memory only after it takes more time than the previous one.
This made me thinking that it's just some container growing but not
shrinking. So I checked my toplevel values with the objsize library, but
I managed to trace down only a fraction of the allocated memory and the
sizes I get don't grow.
How to do memory profiling?
The program can have about 10MB of useful data and 200MB of something I
don't know. How to check what is this?
Dawid
next reply other threads:[~2009-06-05 14:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-05 14:00 Dawid Toton [this message]
2009-06-05 15:39 ` [Caml-list] " Richard Jones
2009-06-05 15:55 ` Dawid Toton
2009-06-05 16:21 ` Dawid Toton
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=4A2924E1.50307@wp.pl \
--to=d0@wp.pl \
--cc=caml-list@yquem.inria.fr \
/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