On Mon, Jan 12, 2009 at 07:28:15PM +0800, John Lepikhin wrote: > > To get real memory used, (Sys.word_size * live_word / 8). Do you use > > out-of-heap datastructure that can use memory ? (malloc-ed > > datastructure). > > The only specific module is ocaml-fd (send file descriptors over pipes).
What version of OCaml is this? I had a look at the source for ocaml-fd and it doesn't seem like it should leak memory. Certainly if there is a memory leak, it would be a subtle one. > I have suspicion on it, but as I said before, 90% of process memory is > filled with specific text data, which is got inside threads and sent to > socket using Unix.write. This data doesn't look like file > descriptors :-) > All other modules are from distribution (Unix, String, Mutex, Threads). It does seem very unlikely that Unix.write would be a problem -- it's a very commonly used function. I'm afraid to say that you'll have to post a short reproducer here before I can look at this further ... > I heard about ocaml-memprof patch. Will it help here? I haven't used it. Seems like you have to patch the compiler. If you suspect a problem in a C binding somewhere, then a quicker approach would probably be to run the program using valgrind. Rich. -- Richard Jones Red Hat _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs