What I was hinting at with Gc.full_major (), is that if you still had a large amount of memory allocated after calling that, I think that means your program is still holding on to the values somewhere.

In your loop, when you read in the data each time, is there any way something might leak? A hashtable holding reference to buffers? Or files left open?

I tried searching for tools which might help with memory leaks or profiling, and got a recent presentation I hadn't seen: http://oud.ocaml.org/2012/slides/oud2012-paper13-slides.pdf
Not that that is much help for you right now...!

And I found these tips on GC params: http://elehack.net/writings/programming/ocaml-memory-tuning
But it doesn't seem like it's a tuning problem, if the memory is still "live", especially after a full_major collection.

Sorry I don't have much more help on this!



On Sun, Aug 18, 2013 at 6:20 PM, oliver <oliver@first.in-berlin.de> wrote:
...strangely the resulting data is different for each run...


...strange.