Skip Menu |
Queue is disabled
This queue is disabled and you may not create new tickets in it. Disabled queues are usually because the distribution was merged with another or changed names. Sometimes they are the end result of a bad autocreate from PAUSE data before anyone noticed.
Report information
Id: 131375
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: perl6 [at] mscha.org
Cc:
AdminCc:

Severity: (no value)
Tag: testneeded
Platform: (no value)
Patch Status: (no value)
VM: (no value)



From: Michael Schaap <perl6 [...] mscha.org>
To: rakudobug [...] perl.org
Date: Fri, 26 May 2017 20:55:29 +0200
Subject: [BUG] error initializing large array on Windows (64-bit)
Download (untitled) / with headers
text/plain 759b
The following script: #!/usr/bin/env perl6 use v6.c; sub MAIN(Int $n = 20_000_000) { say "Starting..."; my int @a = 1..$n; say "Array initialized."; sleep 10; } fails on my Windows machine: Unable to allocate an array of 20000000 elements This is a Windows 10 64-bit machine, running the official 64-bit Rakudo Star 2017.04.3 build. The machine has 16 GB of memory, and at the moment, 48% is in use. When I run the script with n = 15 million, I can see in the task manager that it's using 162.7 MB, which is not excessive. (Memory used jumps from 42% to 43%.) The same script on my Linux server (with a self-built Rakudo Star 2017.04) runs fine, I've tested it up to one billion.
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1.3k
On Fri, 26 May 2017 11:58:50 -0700, perl6@mscha.org wrote: Show quoted text
> The following script: > > #!/usr/bin/env perl6 > > use v6.c; > > sub MAIN(Int $n = 20_000_000) > { > say "Starting..."; > my int @a = 1..$n; > say "Array initialized."; > sleep 10; > } > > fails on my Windows machine: > > Unable to allocate an array of 20000000 elements > > This is a Windows 10 64-bit machine, running the official 64-bit Rakudo > Star 2017.04.3 build. > > The machine has 16 GB of memory, and at the moment, 48% is in use. > When I run the script with n = 15 million, I can see in the task manager > that it's using 162.7 MB, which is not excessive. (Memory used jumps > from 42% to 43%.) > > The same script on my Linux server (with a self-built Rakudo Star > 2017.04) runs fine, I've tested it up to one billion.
Confirmed on 2017.04.3-293-ga7c23aa Rakudo on Win10 Pro. Crashes almost instantly. Task manager tells me I still have 6.4GB of free memory. Tried in command prompt run as administrator as well; same issue. The same script works fine on 2017.05-132-gc5398c8 in a Bodhi Linux 4GB RAM VM running inside that Win10 and uses 229MB of RAM: $ /usr/bin/time ./perl6 foo.p6 Starting... Array initialized. 0.40user 0.04system 0:10.45elapsed 4%CPU (0avgtext+0avgdata 229196maxresident)k 0inputs+0outputs (0major+13244minor)pagefaults 0swaps
The problem still exists on 2017.07 Rakudo Star, on 64-bit Win7
Download (untitled) / with headers
text/plain 323b
On Thu, 24 Aug 2017 08:14:07 -0700, ugexe@cpan.org wrote: Show quoted text
> Largest I can initialize is 16777216. > > https://stackoverflow.com/questions/12596695/why-does-a-float- > variable-stop-incrementing-at-16777216-in-c
Should be fixed with commit https://github.com/MoarVM/MoarVM/commit/f9b65a9e37979ab39fd1283a65ad4e1351ca6058


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org