caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Enrico Tassi <enrico.tassi@inria.fr>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] unmarshaling large data from string on 32 bits
Date: Mon, 2 Feb 2015 13:00:53 +0100	[thread overview]
Message-ID: <CAPFanBFt_=URJLAj3vSo9bpKrgJt6=+fLdXA8HSik3ga8SpKdA@mail.gmail.com> (raw)
In-Reply-To: <20150202103256.GA30053@birba.invalid>

If you don't mind going through a temporary file,
Marshal.{to,from}_channel should work fine.

You should consider opening a problem report to OCaml upstream (
http://caml.inria.fr/mantis/ ) explaining the use-case and asking for
a large-string-safe API (eg. taking and returning lists of strings).

Note that on 32bit architectures, Buffer.t is *also* limited to 16Mio.

On Mon, Feb 2, 2015 at 11:32 AM, Enrico Tassi <enrico.tassi@inria.fr> 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,
> --
> Enrico Tassi
>
> --
> 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

  reply	other threads:[~2015-02-02 12: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 [this message]
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
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='CAPFanBFt_=URJLAj3vSo9bpKrgJt6=+fLdXA8HSik3ga8SpKdA@mail.gmail.com' \
    --to=gabriel.scherer@gmail.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;
as well as URLs for NNTP newsgroup(s).