Scieneer Common Lisp 1.3.9 online documentation

x86 Linux

Introduction

The i586 Linux port is designed to work with Intel Pentium or compatible processors. The port has been built for RedHat Enterprise Linux 4. The RedHat Enterprise Linux 4 build also supports RedHat Enterprise Linux 3.

The port comes with two variants supporting different representations for the Common Lisp long-float type. The first variant represents the long-float type using a 64 bit double precision floating point format, and the second 'long-float' variant represents the long-float type using a 80 bit extended precision floating point format.

The port also offers two memory variations to suit different Linux kernel configurations and applications, see below.

Installation

SCL is intended to be installed in the directory: /opt/scl/. If installed elsewhere then the location of the lisp core file will need to be specified on the command line or the SCLLIB environment variable set to the directory containing the lisp core file.

Foreign code

When compiling foreign C code to be loaded into SCL, define _REENTRANT so that the code is built for thread safety, such as thread safe errno handling.

Foreign code may be compiled into a shared object to speed the loading of the object, see ext:load-dynamic-object. The code should be compiled to be position independent, and the shared object must resolve all dependent libraries. Below is an example of compiling the C code in the file tst.c into a shared object that may be loaded by ext:load-dynamic-object where the shared object uses a library named libmylib.

cc -fPIC -D_REENTRANT -c tst.c
ld -G -o tst.so tst.o -L/mylibs -lmylib -lc

Character encoding conversion.

For character format conversion, between the internal UCS-2 format, the glibc library iconv function is used.

Memory management

The x86 port uses a conservative garbage collector. Objects that might otherwise be garbage may be kept alive due to the conservative nature of the garbage collector.

The control stack and the number stack are shared on the x86 port.

Two different memory map options are available. The standard memory map supports up to 2660M bytes of memory allocated to the lisp heap, using a contiguous segment of the address map starting at address 0x48000000.The alternative 'bigmap' memory map variation supports up to 3556M bytes of memory allocated to the lisp heap, using a contiguous segment of the address map starting at address 0x10000000. With a suitable kernel the maximum of 3556M bytes may be achieved, however for the default 32 bit kernels typically installed the practical limit may be 1664M bytes using the standard memory map. A check is made at startup for address map conflicts and an attempt is made to reduce the size of the dynamic space to avoid any conflicts - a warning will be reported upon startup if a conflict is found. The default size is 512MB, which may be overridden using the command line option -dynamic-space-size followed by the size in MBytes. For SCL builds with custom address maps please contact us.

Known issues

The Linux 2.6.13 kernel broke the 'madvise' system function used by SCL. The SCL 1.2.9 release includes a work-around for the issue but this may reduce performance. The issue has been corrected in the Linux 2.6.14 kernel.

Tracing and breakpoints are not thread safe but should be fine so long as only a single thread touches the code with a breakpoint.