By default, running out of memory is an untrappable, fatal error. However, if suitably built, Perl can use the contents of$^M
as an emergency memory pool afterdie()
ing. Suppose that your Perl were compiled with-DPERL_EMERGENCY_SBRK
and used Perl's malloc. Then
$^M = 'a' x (1 << 16);
would allocate a 64K buffer for use in an emergency. See theINSTALL file in the Perl distribution for information on how to add custom C compilation flags when compiling perl. To discourage casual use of this advanced feature, there is noEnglish long name for this variable.
This variable was added in Perl 5.004.
Perldoc Browser is maintained by Dan Book (DBOOK). Please contact him via theGitHub issue tracker oremail regarding any issues with the site itself, search, or rendering of documentation.
The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via thePerl issue tracker, themailing list, orIRC to report any issues with the contents or format of the documentation.