A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.lispworks.com/documentation/lw71/LW/html/lw-1447.htm below:

set-static-segment-size

Description

The function set-static-segment-size sets the size of new static segments other than the initial one, and optionally the size of the initial one.

Normally you should not use static objects, because it makes the GC less efficient. However, in some circumstances it may be the best solution. In this situation set-static-segment-size can be used to minimize the overhead.

The overhead for the GC depends on the number of segments, so it is best to minimize the number of static segments by making them larger. On the other hand, if a segment is not full, it wastes memory. Hence the ideal solution would be the smallest single segment that is large enough to accommodate all static allocation. You can check the current number and sizes of static segments by looking at the output of (room t).

By default, LispWorks allocates a small segment on startup of size 64 kB (#x10000). It actually uses very little of it (a few hundred bytes, up to several kB if you have many processes), and if your application uses only a few kB that should be enough. If there is further static allocation and the initial segment becomes full, then LispWorks allocates another segment of size 1 MB, and repeats this as needed.

set-static-segment-size controls these sizes. size controls the size of all the static segments except the one that is allocated on startup. init-size controls the size of the initial segment.

The initial segment is allocated before your code is called on startup, so to set the initial segment size you need to call set-static-segment-size before delivering the image. set-static-segment-size gives an error if init-size is non-nil and the Mobile GC is already running.

A nil value means do not change the value. Calling set-static-segment-size with nil is a way to get the current settings.

set-static-segment-size returns the previous settings.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4