caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Yaron Minsky <yminsky@gmail.com>
To: Xavier Leroy <xavier.leroy@inria.fr>
Cc: Caml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Re: Size limitation on input_value
Date: Mon, 26 Jul 2004 14:14:46 -0400	[thread overview]
Message-ID: <891bd33904072611144e47e57e@mail.gmail.com> (raw)
In-Reply-To: <20040726171205.GD6618@yquem.inria.fr>

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

Interesting.  I can't replicate this on a stock ocaml toplevel.  It
does occur, however, on a toplevel with vmthreads compiled in.  I've
attached the file foo.ml, as well as the output file with the
appropriate OCAMLRUNPARAM value.

I created the toplevel with this command:

    ocamlfind ocamlmktop -linkpkg -package threads -vmthread -o foocaml

And then I got the error by running the command "./foocaml foo.ml".

y

On Mon, 26 Jul 2004 19:12:05 +0200, Xavier Leroy <xavier.leroy@inria.fr> wrote:
> > So, I've investigated this a little further, and it's a definite
> > regression.  Here's the function I used:
> > [...]
> > On 3.08, I get this:
> > # run ~save:true ~load:true 1000000;;
> > Out of memory during evaluation.
> > # run ~save:true ~load:false 1000000;;
> > Out of memory during evaluation.
> > # run ~save:false ~load:false 1000000;;
> > - : unit = ()
> 
> I cannot reproduce this behavior with 3.08 here.  All three phrases
> evaluate without Out_of_memory conditions.
> 
> There have been no significant changes in the code for output_value
> and input_value between 3.07 and 3.08.
> 
> Could you investigate some more where the Out_of_memory comes from?
> strace and OCAMLRUNPARAM='v=63' could give useful clues.
> 
> Please use caml@inria.fr or caml-bugs@inria.fr to continue this discussion.
> 
> - Xavier Leroy
>

[-- Attachment #2: foo.ml --]
[-- Type: application/octet-stream, Size: 338 bytes --]

let run ~save ~load n =
  let ar = Array.init n (fun i -> (i,i+1,i+2,i+3)) in
  if save then begin
    let f = open_out_bin "foo.val" in
    output_value f ar;
    close_out f
  end;
  if load then begin
    let f = open_in_bin "foo.val" in
    ignore (input_value f);
    close_in f 
  end


let () = run ~save:true ~load:true 1000000;;

[-- Attachment #3: attach.txt --]
[-- Type: text/plain, Size: 14139 bytes --]

[14:12:13 yminsky@quant2 scanner]$ ./foocaml  foo.ml
Initial minor heap size: 128k bytes
Initial major heap size: 240k bytes
Initial space overhead: 80%
Initial max overhead: 500%
Initial heap increment: 240k bytes
Initial stack limit: 1024k bytes
<>Starting new major GC cycle
!<Growing heap to 480k bytes
Growing page table to 352 entries
>$<>Starting new major GC cycle
Growing gray_vals to 16k bytes
!<>$Growing global data to 3072 entries
<>$Growing heap to 4388k bytes
Growing page table to 1331 entries
Starting new major GC cycle
!ref_table threshold crossed
<Growing heap to 4628k bytes
Growing page table to 1393 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>Starting new major GC cycle
Growing gray_vals to 32k bytes
Growing gray_vals to 64k bytes
!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 4868k bytes
Growing page table to 1455 entries
>!ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 5108k bytes
Growing page table to 1517 entries
>Starting new major GC cycle
Growing gray_vals to 128k bytes
Growing gray_vals to 256k bytes
!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 5348k bytes
Growing page table to 1677 entries
>!ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 5588k bytes
Growing page table to 1739 entries
>$ref_table threshold crossed
<>Starting new major GC cycle
!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 5828k bytes
Growing page table to 1801 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 6068k bytes
Growing page table to 1863 entries
>!ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 6308k bytes
Growing page table to 1925 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 6548k bytes
Growing page table to 1987 entries
>Starting new major GC cycle
!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 6788k bytes
Growing page table to 2049 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 7028k bytes
Growing page table to 2111 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 7268k bytes
Growing page table to 2173 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 7508k bytes
Growing page table to 2235 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 7748k bytes
Growing page table to 2297 entries
>Starting new major GC cycle
!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 7988k bytes
Growing page table to 2359 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 8228k bytes
Growing page table to 2421 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 8468k bytes
Growing page table to 2483 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 8708k bytes
Growing page table to 2545 entries
>!ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 8948k bytes
Growing page table to 2607 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 9188k bytes
Growing page table to 2669 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 9428k bytes
Growing page table to 2731 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>Starting new major GC cycle
Growing gray_vals to 512k bytes
!ref_table threshold crossed
<Growing heap to 9668k bytes
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 9908k bytes
Growing page table to 2922 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 10148k bytes
Growing page table to 2984 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 10388k bytes
Growing page table to 3046 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 10628k bytes
Growing page table to 3108 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 10868k bytes
Growing page table to 3170 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 11108k bytes
Growing page table to 3232 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 11348k bytes
Growing page table to 3294 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 11588k bytes
Growing page table to 3356 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 11828k bytes
Growing page table to 3418 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 12068k bytes
Growing page table to 3480 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>Starting new major GC cycle
!ref_table threshold crossed
<Growing heap to 12308k bytes
Growing page table to 3542 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 12548k bytes
Growing page table to 3604 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 12788k bytes
Growing page table to 3666 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 13028k bytes
Growing page table to 3728 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 13268k bytes
Growing page table to 3790 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 13508k bytes
Growing page table to 3852 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 13748k bytes
Growing page table to 3914 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 13988k bytes
Growing page table to 3976 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 14228k bytes
Growing page table to 4038 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 14468k bytes
Growing page table to 4100 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 14708k bytes
Growing page table to 4162 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 14948k bytes
Growing page table to 4224 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 15188k bytes
Growing page table to 4286 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 15428k bytes
Growing page table to 4348 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 15668k bytes
Growing page table to 4410 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 15908k bytes
Growing page table to 4472 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>Starting new major GC cycle
!ref_table threshold crossed
<Growing heap to 16148k bytes
Growing page table to 4534 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 16388k bytes
Growing page table to 4596 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 16628k bytes
Growing page table to 4658 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 16868k bytes
Growing page table to 4720 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 17108k bytes
Growing page table to 4782 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 17348k bytes
Growing page table to 4844 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 17588k bytes
Growing page table to 4906 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 17828k bytes
Growing page table to 4968 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 18068k bytes
Growing page table to 5030 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 18308k bytes
Growing page table to 5092 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 18548k bytes
Growing page table to 5154 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 18788k bytes
Growing page table to 5216 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 19028k bytes
Growing page table to 5278 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 19268k bytes
Growing page table to 5340 entries
>!ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 19508k bytes
Growing page table to 5402 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 19748k bytes
Growing page table to 5464 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 19988k bytes
Growing page table to 5526 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 20228k bytes
Growing page table to 5588 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 20468k bytes
Growing page table to 5650 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 20708k bytes
Growing page table to 5712 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 20948k bytes
Growing page table to 5774 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 21188k bytes
Growing page table to 5836 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 21428k bytes
Growing page table to 5898 entries
>$ref_table threshold crossed
<>$ref_table threshold crossed
<>$ref_table threshold crossed
<Growing heap to 21668k bytes
Growing page table to 5960 entries
>Starting new major GC cycle
Growing gray_vals to 1024k bytes
!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 21908k bytes
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 22148k bytes
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 22388k bytes
Growing page table to 6279 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 22628k bytes
Growing page table to 6341 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 22868k bytes
Growing page table to 6403 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 23108k bytes
Growing page table to 6465 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 23348k bytes
Growing page table to 6527 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 23588k bytes
Growing page table to 6589 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!ref_table threshold crossed
<Growing heap to 23828k bytes
Growing page table to 6651 entries
>!ref_table threshold crossed
<>!ref_table threshold crossed
<>!Out of memory during evaluation.
<Growing heap to 24068k bytes
Growing page table to 7296 entries
>!

  reply	other threads:[~2004-07-26 18:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-22 19:41 [Caml-list] " Yaron Minsky
2004-07-26 16:48 ` [Caml-list] " Yaron Minsky
2004-07-26 17:12   ` Xavier Leroy
2004-07-26 18:14     ` Yaron Minsky [this message]
2004-07-27  7:41       ` Xavier Leroy
2004-07-27 12:04         ` Yaron Minsky

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=891bd33904072611144e47e57e@mail.gmail.com \
    --to=yminsky@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=xavier.leroy@inria.fr \
    --cc=yminsky@cs.cornell.edu \
    /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).