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

MCL can address more than 200 MB memory

Per your question to comp.lang.lisp.mcl, I've verified that MCL 2.0.1 can
address 200 MB, at least via virtual memory.  I allocated 256 MB to VM and
240 MB to the partition for MCL 2.0.1, and ran the following lisp function
which creates arbitrarily large list structures in a way that should
continually revisit different portions of memory.  I invoked the lisp function
by calling (vm 10000 10000).  It ran to i = 2943 in 12 minutes 30 seconds,
before hitting a GC and thrashing the disk. Along the way it made frequent
disk accesses, indicating that VM was really being used.  Reaching i = 2943
for 240 MB partition of MCL is consistent with previous experiments that
reached lower values of i for smaller partitions. So this clearly indicates
that MCL can address and utilize over 200 MB of memory. I would expect
the experiment should work just as well for all RAM as for VM. (My 
machine has 32 MB of RAM.)  I don't know what the upper limit for address
space of MCL is, though with 32 bit addressing, perhaps it is 4 billion
bytes -- Apple should be able to answer this question, of course.

(defun vm (n m)
  (let (L Lcdr
    (setf L nil)
    (loop for i from 1 to n do (push nil L)) 
    (loop for i from 1 to m do
          (format t "~%i = ~D" i)
          (setf Lcdr L)
          (loop while Lcdr do
                (rplaca Lcdr (push i (first Lcdr)))
                (setf Lcdr (rest Lcdr))
          ; (format t "~%list = ~S" L)

Hope this helps,

Phil Jackson