From: Berke Durak <berke.durak@exalead.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Questions on replacing finalizers and memory footprints
Date: Fri, 07 Dec 2007 12:31:59 +0100 [thread overview]
Message-ID: <47592F2F.5080900@exalead.com> (raw)
In-Reply-To: <475909E8.7010301@inria.fr>
Xavier Leroy a écrit :
>> Also, is there a simple way to implement a function (perhaps using
>> Obj.magic) which will walk a (possibly circular) network of tuples,
>> arrays, variadic entities and lists, and return the total number of
>> bytes used up by that structure? I see that this should be possible
>> in principle with the present implementation of the runtime if one
>> could get some basic information about the internal type of an
>> array.
>
> Jean-Christophe Filliâtre's "size" library does exactly this:
>
> http://www.lri.fr/~filliatr/software.en.html
>
> - Xavier Leroy
>
> _______________________________________________
> 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
Hello,
I once had more or less the same problem in the EDOS project with huge
data structures.
Filliâtre's size library was also growing too large a hashtable,
so I decided to use something else.
My solution was to marshal the data structure and then analyze the
marshalled data by recomputing its type.
You first write a TYPER module that represents the types in your
marshalled data structure, then use the Analyzer module on your
output.
I was more interested in the size strings were taking in memory,
but it should be easy to modify. All the ugly parts (parsing the
marshal format, and the combinators for describing the types)
have been defined.
https://protactinium.pps.jussieu.fr:12345/svn/edos/users/berke/dvhfz/analyze.ml
--
Berke DURAK
prev parent reply other threads:[~2007-12-07 11:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 11:12 Thomas Fischbacher
2007-12-06 12:51 ` [Caml-list] " dmitry grebeniuk
2007-12-06 14:26 ` Richard Jones
2007-12-06 14:57 ` Thomas Fischbacher
2007-12-06 16:50 ` Jon Harrop
2007-12-06 21:33 ` forum
2007-12-07 8:52 ` Xavier Leroy
2007-12-07 10:44 ` Jean-Christophe Filliâtre
2007-12-07 10:35 ` Jon Harrop
2007-12-07 11:18 ` forum
2007-12-07 19:54 ` Jean-Christophe Filliâtre
2007-12-07 21:01 ` forum
2007-12-08 9:57 ` Alexandre Pilkiewicz
2007-12-08 14:20 ` Benjamin Canou
2007-12-07 20:31 ` Christophe Raffalli
2008-01-23 12:08 ` Hendrik Tews
2007-12-07 11:31 ` Berke Durak [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47592F2F.5080900@exalead.com \
--to=berke.durak@exalead.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox