[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-05-28 (14:31) |
From: | Richard Jones <rich@a...> |
Subject: | Re: [Caml-list] Out_of_memory exception in output_value |
Thanks to some people who helped me off-list. I've solved this now. It turns out that during output_value, the OCaml code allocates a block of memory to contain the marshalled representation of the data. Each time it runs out of room, it doubles the size of that block using realloc(). In my case the final allocation was something like 260MB because the size of the data required was approx 144MB (ie. just over 130MB, so it needed to double the block). realloc() was actually returning NULL because the kernel couldn't allocate enough memory. Allocating another 1GB of swap solves the problem nicely. Rich. -- Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment http://www.winwinsales.co.uk/ - CRM improvement consultancy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners