From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 4AC8F7F6CC for ; Mon, 2 Feb 2015 13:01:36 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.213.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.213.179 as permitted sender) identity=mailfrom; client-ip=209.85.213.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ig0-f179.google.com) identity=helo; client-ip=209.85.213.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-ig0-f179.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CPAQDhZc9Um7PVVdFbg1hZBIJ9sh2PSoVxAoERB0MBAQEBAREBAQEBAQYLCwkULoQNAQEEEhEdARsSCwEDDAYFCw0CAgkdAgIiAREBBQEKEgYTEhCHdgEDEQ2yBz4xiy6Ba4J3iksKGScDClSEfAEBAQEGAQEBARgBBQ6BE41/WAeCaIFBBYRKCo4DhVeBTYsVhDASI4EMCYQRPTGBAiSBHAEBAQ X-IPAS-Result: A0CPAQDhZc9Um7PVVdFbg1hZBIJ9sh2PSoVxAoERB0MBAQEBAREBAQEBAQYLCwkULoQNAQEEEhEdARsSCwEDDAYFCw0CAgkdAgIiAREBBQEKEgYTEhCHdgEDEQ2yBz4xiy6Ba4J3iksKGScDClSEfAEBAQEGAQEBARgBBQ6BE41/WAeCaIFBBYRKCo4DhVeBTYsVhDASI4EMCYQRPTGBAiSBHAEBAQ X-IronPort-AV: E=Sophos;i="5.09,506,1418079600"; d="scan'208";a="119837762" Received: from mail-ig0-f179.google.com ([209.85.213.179]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 02 Feb 2015 13:01:35 +0100 Received: by mail-ig0-f179.google.com with SMTP id l13so16321770iga.0; Mon, 02 Feb 2015 04:01:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=biNi/KJzjF777vy/FNFzEaXo2GJ2oMY9+RXcOLmVITU=; b=HotntW8iNsWol7VnfmDaxQEwsm2CyftSfE1vs3SKHci5Xwy2c3izw4LrJs5wfhabrS tE+JpMWjQ4v3YAvBWVm+z5qfgIMMFTL0I1P0uXMXVevw6y4LI4uuxTGBJJXv3ggPOvgb CTn7lD2qSk8i98SdBVkaz1IzeegGcCFUULADBSsbvCvfQufRjMHHARAcGpqx797Zmc4r dsrsLrGQ2KG8G2RLTVChQdmx4Ysjr0Di42aXfx2ZFGGcgcc9gMC8Yj7NskAeZnzRg75M TUC8CWjHexXIF970FW/byIqhtVYwBv6aga1zB+juRxbeowqa4rxfGV1TPGsN4BPvDzQ1 sHgA== X-Received: by 10.42.83.147 with SMTP id h19mr18274809icl.95.1422878494151; Mon, 02 Feb 2015 04:01:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.13.195 with HTTP; Mon, 2 Feb 2015 04:00:53 -0800 (PST) In-Reply-To: <20150202103256.GA30053@birba.invalid> References: <20150202103256.GA30053@birba.invalid> From: Gabriel Scherer Date: Mon, 2 Feb 2015 13:00:53 +0100 Message-ID: To: Enrico Tassi Cc: caml users Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] unmarshaling large data from string on 32 bits 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 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