caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] out-of-the-heap 'a arrays ?
@ 2013-11-05 17:07 Jean Krivine
  2013-11-05 19:06 ` Lukasz Stafiniak
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Jean Krivine @ 2013-11-05 17:07 UTC (permalink / raw)
  To: caml users

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

Dear all

I am developing a graph rewriting algorithm which operates on large graphs.
Because of the large data structure the GC becomes quite inefficient for
two reasons that I am inferring:
1/ there is no correlation between the time of allocation of an object and
its likelihood to be garbage collected.
2/ even when there is nothing to collect, I guess that the GC is still
inspecting the heap.

Point 1 is inducing some memory leak and point 2 is just inefficient. I
think I took care of point 1 by using my own allocation heap (so there is
nothing to collect for the GC). But to take care of point 2 I guess I need
to tell the GC that my heap (an extensible array) should not be inspected.

As far as I understand there is a module Ancient which I can use to tell
the GC to ignore my array but, if I understand well, it would only work if
I use my array in a read only fashion.
I also thought I could use Bigarray, but it seems it can only be used for
basic array types.

To summarize my question: is there a (reasonable) way to implement an 'a
array out of the ocaml heap ?

Thanks!
JK

[-- Attachment #2: Type: text/html, Size: 1298 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-11-06 14:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-05 17:07 [Caml-list] out-of-the-heap 'a arrays ? Jean Krivine
2013-11-05 19:06 ` Lukasz Stafiniak
2013-11-05 19:15   ` Lukasz Stafiniak
2013-11-06  9:19     ` Jean Krivine
2013-11-06 14:20       ` Richard W.M. Jones
2013-11-06  9:44 ` Francois Berenger
2013-11-06 13:10 ` Gerd Stolpmann
2013-11-06 13:39   ` Jean Krivine
2013-11-06 14:19 ` Richard W.M. Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).