I am using sun common lisp 4.0 on sunworkstation (sunos 4.1.3)
I am getting this message when I plot binarization picture.
> (draw-fast-thresholded-image image 125)
;;; GC: 724538 words [2898152 bytes] of dynamic storage in use.
;;; 61892 words [247568 bytes] of free storage available before a GC.
;;; 848322 words [3393288 bytes] of free storage available if GC is disabled.
;;; GC: 724538 words [2898152 bytes] of dynamic storage in use.
;;; 61892 words [247568 bytes] of free storage available before a GC.
;;; 848322 words [3393288 bytes] of free storage available if GC is disabled.
;;; Expanding Dynamic Memory
drawing picture seems very slow, and I think memory allocation is
the problem. Does anyone know how to solve this problem?
At least how to disable 'GC" or what does 'GC' mean?
Thanks in advance
Tim
····@Virginia.EDU
In article <··········@murdoch.acc.Virginia.EDU>
····@wald.stat.Virginia.EDU (Timothy Yi) writes:
> I am using sun common lisp 4.0 on sunworkstation (sunos 4.1.3)
>
> I am getting this message when I plot binarization picture.
>
> > (draw-fast-thresholded-image image 125)
> ;;; GC: 724538 words [2898152 bytes] of dynamic storage in use.
> ;;; 61892 words [247568 bytes] of free storage available before a GC.
> ;;; 848322 words [3393288 bytes] of free storage available if GC is
disabled.
> ;;; GC: 724538 words [2898152 bytes] of dynamic storage in use.
> ;;; 61892 words [247568 bytes] of free storage available before a GC.
> ;;; 848322 words [3393288 bytes] of free storage available if GC is
disabled.
> ;;; Expanding Dynamic Memory
>
>
> drawing picture seems very slow, and I think memory allocation is
> the problem. Does anyone know how to solve this problem?
> At least how to disable 'GC" or what does 'GC' mean?
>
> Thanks in advance
>
> Tim
>
> ····@Virginia.EDU
If you are really using Lucid CommonLisp, you can do something. (Probably
too, if you use another implementation, but I can't tell you about others.
:-)
Please read carefully the section on Storage Management in the User's
Guide.
You can switch of Garbage Collection by (gc-off). (gc-on) switches GC back
on. If you've switched it off, you must explicitely switch it back on
again - or, of course, restart Lisp.
If you know the size of the picture in advance, you may be able to
allocate as much memory as required directly. That's where you may want to
look into the manual. You have to find out, into what part of memory the
picture goes. It could go into the so called "reserved area" or into the
"dynamic area". To find that out, use (room t) before and after the
function. It displays an expanded storage allocation report which I can't
explain here. Look at where the big changes take place. This should be the
area where your picture goes. Since in your protocol, GC is running, I
guess it goes into the dynamic area. You can expand that with
(change-memory-management :expand N)
where N ist the number of 64Kbyte blocks. If you receive an error message
stating that you can't expand that much, try
(change-memory-management :growth-limit N :expand N)
If you need to expand the reserved area, not the dynamic area, use
(change-memory-management :expand-reserved N)
or
(change-memory-management :reserved-growth-rate N :expand-reserved N)
Please keep in mind that these are implementation specific functions, not
part of the CL standard. If you use them in your programs, they may be no
longer portable. But perhaps that's not your problem.
Hope that helps.
Stephan.
--
Stephan Kepser ······@thecube.cis.uni-muenchen.de
CIS Centrum fuer Informations- und Sprachverarbeitung
LMU Muenchen, Wagmuellerstr. 23/III, D-80538 Muenchen, Germany
Tel: +49 +89/2110666 Fax: +49 +89/2110674