diff options
author | Leon Timmermans <fawaka@gmail.com> | 2012-01-25 20:38:46 +0100 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-01-30 14:51:52 -0800 |
commit | 307764ab65e391edc68609861cbfa32efdfee95b (patch) | |
tree | 5c71fac6b5a1230ac4f5774a965c2b3bfa32d408 /lib/PerlIO.pm | |
parent | 3bf50cd49ef38ff3b717452d0806c49cc1ddd524 (diff) | |
download | perl-307764ab65e391edc68609861cbfa32efdfee95b.tar.gz |
Moving :mmap out of core binary into a module
Diffstat (limited to 'lib/PerlIO.pm')
-rw-r--r-- | lib/PerlIO.pm | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/lib/PerlIO.pm b/lib/PerlIO.pm index 46e6e444ef..c94685bbf9 100644 --- a/lib/PerlIO.pm +++ b/lib/PerlIO.pm @@ -93,20 +93,6 @@ as being an end-of-file marker. Based on the C<:perlio> layer. -=item :mmap - -A layer which implements "reading" of files by using C<mmap()> to -make a (whole) file appear in the process's address space, and then -using that as PerlIO's "buffer". This I<may> be faster in certain -circumstances for large files, and may result in less physical memory -use when multiple processes are reading the same file. - -Files which are not C<mmap()>-able revert to behaving like the C<:perlio> -layer. Writes also behave like the C<:perlio> layer, as C<mmap()> for write -needs extra house-keeping (to extend the file) which negates any advantage. - -The C<:mmap> layer will not exist if the platform does not support C<mmap()>. - =item :utf8 Declares that the stream accepts perl's I<internal> encoding of @@ -208,6 +194,20 @@ for example from Shift-JIS to Unicode. Note that under C<stdio> an C<:encoding> also enables C<:utf8>. See L<PerlIO::encoding> for more information. +=item :mmap + +A layer which implements "reading" of files by using C<mmap()> to +make a (whole) file appear in the process's address space, and then +using that as PerlIO's "buffer". This I<may> be faster in certain +circumstances for large files, and may result in less physical memory +use when multiple processes are reading the same file. + +Files which are not C<mmap()>-able revert to behaving like the C<:perlio> +layer. Writes also behave like the C<:perlio> layer, as C<mmap()> for write +needs extra house-keeping (to extend the file) which negates any advantage. + +The C<:mmap> layer will not exist if the platform does not support C<mmap()>. + =item :via Use C<:via(MODULE)> either in open() or binmode() to install a layer @@ -284,7 +284,6 @@ DOS-like platforms and depending on the setting of C<$ENV{PERLIO}>: unset / "" unix perlio / stdio [1] unix crlf stdio unix perlio / stdio [1] stdio perlio unix perlio unix perlio - mmap unix mmap unix mmap # [1] "stdio" if Configure found out how to do "fast stdio" (depends # on the stdio implementation) and in Perl 5.8, otherwise "unix perlio" |