[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing the Heap Size at run time
- To: bill@cambridge.apple.com
- Subject: Re: Changing the Heap Size at run time
- From: "Mark A. Tapia" <markt@dgp.toronto.edu>
- Date: Tue, 8 Feb 1994 13:20:13 -0500
- Cc: info-mcl@cambridge.apple.com
On 08 Feb 1994, Bill St. Clair supplied a function to grow the
size of the mac heap, in reply to Karsten Poeck. Instead of
Bill's function:
(defun ensure-mac-heap-space (minimum)
(let ((p (#_NewPtr minimum)))
(unless (%null-ptr-p p)
(#_DisposePtr p)
t)))
I used the following function, and wondered whether the two were equivalent?
(defun check-request (minimum)
;; checks whether there is enough space left on the heap
;; to create an object of size minimum bytes
;; returns three values:
;; t when the request can be satisfied, otherwise nil
;; the actual amount available
;; the amount requested
(let ((actual (require-trap #_compactmem request)))
(values
(< actual request)
actual
request)))
mark