[Prev][Next][Index][Thread]

Re: 9500 crashes: Heap Growth Workaround



Did you try the fix that Chris Vincent sent out last 

Date: Sat, 03 Feb 1996 16:22:08 -0500
From: Christopher Vincent <cvince@ai.mit.edu>

It sounds like your bug is not triggered by cl-http in particular, but by 
loading a large system into MCL.  The first thing you should do is 
install macsbug (free) so you know why you are crashing.  I have had 
problems with MCL crashing when the mac heap needs to allocate more memory.

gb@digitool.com suggested the following fix, which has worked for me:

>Try to minimize the possibility of growzone happening at an inoopportune
>time by preallocating/disposing of a large block of mac memory:
>
>(defun preallocate-mac-memory (nbytes)
>  (let* ((p (#_NewPtr nbytes)))
>    (unless (ccl::%null-ptr-p p)
>      (#_DisposPtr p))))
>
>and calling (preallocate-mac-memory ...) before starting the http server.
>
>Determining the right value of "nbytes" requires a little bit of 
>experimentation; you want to cause what ROOM reports as "the Mac Heap"
>to grow as much as it needs to without starving the "lisp heap".

Christopher Vincent
cvince@ai.mit.edu