Browse thread
[Caml-list] Out_of_memory exception in output_value
-
Richard Jones
-
Richard Jones
- Jacques Carette
-
Richard Jones
[
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: | -- (:) |
| From: | Jacques Carette <carette@m...> |
| Subject: | RE: [Caml-list] Out_of_memory exception in output_value |
> 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(). Wouldn't it be more system-friendly to try successively factors *2, *1.5, *1.1, and *1.05 before actually failing? This would not cost any performance penalty in successful cases, and could decrease the number of failing cases. Seems win-win to me. And as long as it is a multiplicative factor, this does not lead to algorithmic degenerescence. Jacques ------------------- 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