2 Customizing the Lisp Environment
change-memory-managementallows you to change the parameters that control memory expansion. The settings that you choose depend on the amount of memory available on the machine that is running Lisp and the number and size of other processes running on the machine. To get the best performance while keeping a reasonable image size, you can adjust the following parameters:
If you are running a specific application whose storage requirements are well understood, you could set up your environment by using the following guidelines.
(room t). Note the number of segments used by the dynamic semi-spaces at this point.
:expandkeyword argument to the number of segments found in the previous step.
:growth-ratekeyword argument so that you only use as much memory as is necessary.
:reclamation-ratiokeyword argument to 0.33 to allow plenty of space. (Functions such as
mapcarcons incidentally.) Otherwise, use a lower value for this argument, such as 0.25 or 0.10.
:growth-limitkeyword argument. This argument establishes a software partition beyond which the system cannot grow without programmer intervention, and it covers both dynamic semi-spaces, the static area, the reserved area, and both read-only areas. By specifying a high value, you limit the size of the Lisp process solely to the amount of available paging space.
:reclamation-ratiokeyword argument controls the frequency of dynamic garbage collection. The larger the value for this argument, the more frequently memory is expanded. If the number is too small, the system will be cramped. Dynamic garbage collections will occur frequently and will not free much space. If the number is too large, memory expansion might provide more space than your application really needs.
:growth-ratekeyword argument controls the reaction of the system during expansion. A large number means that large blocks of segments are added to each dynamic semi-space whenever memory is expanded; thus, you can overshoot the requirements of the application. Too small a number means that the system takes a long time to expand to an effective size.
change-memory-managementthat are provided with Liquid Common Lisp. These values are in a middle range and can accommodate the average user and application. See Chapter 5, "Storage Management in Common Lisp" in The User's Guide for more information.
Generated with Harlequin WebMaker