develooper Front page | perl.perl5.porters | Postings from March 2000

read(FH,$buffer,2**31 - 1)

Thread Previous
From:
Jeff Pinyan
Date:
March 15, 2000 15:50
Subject:
read(FH,$buffer,2**31 - 1)
Message ID:
Pine.GSO.4.21.0003151846300.17415-100000@crusoe.crusoe.net
Hmm.  Why doesn't Perl like reading a lot from STDIN?

  perl -Mdiagnostics -e 'read(FOO,$FOO,2 ** 31 - 1)'

runs smoothly.

  perl -Mdiagnostics -e 'read(STDIN,$STDIN,2 ** 31 - 1)'

Out of memory during "large" request for -2147479552 bytes at -e line 1
(#1)

    (F) The malloc() function returned 0, indicating there was insufficient
    remaining memory (or virtual memory) to satisfy the request. However,
    the request was judged large enough (compile-time default is 64K), so
    a possibility to shut down by trapping this error is granted.

-- 
MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve             japhy@pobox.com
http://www.pobox.com/~japhy/                  http://pinyaj.stu.rpi.edu/
PerlMonth - An Online Perl Magazine            http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc.    http://www.perlarchive.com/


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About