From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Alain Frisch <alain.frisch@lexifi.com>
Cc: Enrico Tassi <enrico.tassi@inria.fr>, caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] unmarshaling large data from string on 32 bits
Date: Thu, 5 Feb 2015 10:01:06 +0100 [thread overview]
Message-ID: <CAPFanBFf7EiTmgwdUNWqyurz_VC2aK627myWOXfPLJEp=oguoA@mail.gmail.com> (raw)
In-Reply-To: <54D33020.6010707@lexifi.com>
> One possible work-around is to use an alternative implementation of the demarshaler (there is such a pure OCaml implementation in Frama-C).
Is this implementation publicly available somewhere?
On Thu, Feb 5, 2015 at 9:56 AM, Alain Frisch <alain.frisch@lexifi.com> wrote:
> Hello,
>
> Be aware when using the generic demarshaling on 32 bit systems with large
> data (even when they fit in a string): this will expand the heap (adding
> more pages to it) on every demarshaling, and unless you arrange so that the
> compacter runs often enough (calling manually Gc.compact for instance),
> you'll end up eating all the memory.
>
> This is documented here:
>
> http://caml.inria.fr/mantis/view.php?id=5813
>
> One possible work-around is to use an alternative implementation of the
> demarshaler (there is such a pure OCaml implementation in Frama-C). Another
> is to avoid the generic marshaling, either by writing a manual version for
> your specific data type or by generating it from your type definitions (à la
> bin-prot, I assume).
>
>
> Alain
>
>
>
> On 02/02/2015 11:32 AM, Enrico Tassi wrote:
>>
>> Hello, I've just discovered that on 32 bits systems strings are
>> limited to 16M. I'm using strings as buffers holding data to
>> be unmarshaled. I could use another data structure, like a Buffer.t,
>> but I see no API for unmarshaling from a Buffer.t.
>>
>> Is there another way? Is there code out there implementing that?
>>
>> Best,
>>
>
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
next prev parent reply other threads:[~2015-02-05 9:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-02 10:32 Enrico Tassi
2015-02-02 12:00 ` Gabriel Scherer
2015-02-02 13:08 ` Pierre-Marie Pédrot
2015-02-04 16:47 ` Enrico Tassi
2015-02-04 23:51 ` Gerd Stolpmann
2015-02-05 8:56 ` Alain Frisch
2015-02-05 9:01 ` Gabriel Scherer [this message]
2015-02-05 9:34 ` Alain Frisch
2015-02-05 9:58 ` Pierre-Marie Pédrot
2015-02-05 10:33 ` Enrico Tassi
2015-02-05 10:50 ` Alain Frisch
2015-02-05 12:22 ` Fabrice Le Fessant
2015-02-05 12:24 ` Alain Frisch
2015-02-05 12:27 ` Enrico Tassi
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='CAPFanBFf7EiTmgwdUNWqyurz_VC2aK627myWOXfPLJEp=oguoA@mail.gmail.com' \
--to=gabriel.scherer@gmail.com \
--cc=alain.frisch@lexifi.com \
--cc=caml-list@inria.fr \
--cc=enrico.tassi@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