[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Memory problems in OO context



langfml [at] eng [dot] auburn [dot] edu (Matthew Langford) wrote:
>As a side note, I wonder if the memory is reclaimed before MacPerl needs
>the memory?  Unfortunately, when MacPerl runs out of memory for this
>script, it crashes hard (it and my machine and MacsBug all flop on the
>ground).  At least in this case; I have seen "out of memory" errors for
>other scripts.

Is the $^M variable available under MacPerl?

       $^M     By default, running out of memory it is not
               trappable.  However, if compiled for this, Perl
               may use the contents of $^M as an emergency pool
               after die()ing with this message.  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 when in
               emergency.  See the INSTALL file for information
               on how to enable this option.  



  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  ken@forum.swarthmore.edu                            The Math Forum



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org