source: trunk/gc6.8/README.QUICK@ 360

Last change on this file since 360 was 132, checked in by cinc, 19 years ago

Boehm-Demers-Weiser garbage collector. Single-threaded for OS/2.

File size: 3.7 KB
Line 
1Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
2Copyright (c) 1991-1995 by Xerox Corporation. All rights reserved.
3Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
4Copyright (c) 1999-2001 by Hewlett-Packard. All rights reserved.
5
6THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
7OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
8
9Permission is hereby granted to use or copy this program
10for any purpose, provided the above notices are retained on all copies.
11Permission to modify the code and to distribute modified code is granted,
12provided the above notices are retained, and a notice that the code was
13modified is included with the above copyright notice.
14
15A few files have other copyright holders. A few of the files needed
16to use the GNU-style build procedure come with a modified GPL license
17that appears not to significantly restrict use of the collector, though
18use of those files for a purpose other than building the collector may
19require the resulting code to be covered by the GPL.
20
21For more details and the names of other contributors, see the
22doc/README* files and include/gc.h. This file describes typical use of
23the collector on a machine that is already supported.
24
25For the version number, see doc/README or version.h.
26
27INSTALLATION:
28Under UN*X, Linux:
29Alternative 1 (the old way): type "make test" in this directory.
30 Link against gc.a.
31
32Alternative 2 (the new way): type
33 "./configure --prefix=<dir>; make; make check; make install".
34 Link against <dir>/lib/libgc.a or <dir>/lib/libgc.so.
35 See README.autoconf for details
36
37Under OS/2 or Windows 95, 98, Me, NT, or 2000:
38copy the appropriate makefile to MAKEFILE, read it, and type "nmake test".
39(Under Windows, this assumes you have Microsoft command-line tools
40installed, and have DOS configured with enough environment space to run them.)
41Read the machine specific README in the doc directory if one exists.
42The only way to develop code with the collector for Windows 3.1 is
43to develop under Windows NT or 95+, and then to use win32S.
44
45If you need thread support, you will need to either follow the special
46platform-dependent instructions (win32), or add a suitable define
47option as described in Makefile.
48
49If you wish to use the cord (structured string) library, type
50"make cords". (This requires an ANSI C compiler. You may need
51to redefine CC in the Makefile. The CORD_printf implementation in
52cordprnt.c is known to be less than perfectly portable. The rest
53of the package should still work.)
54
55If you wish to use the collector from C++, type
56"make c++". These add further files to gc.a and to the include
57subdirectory. See cord/cord.h and include/gc_cpp.h.
58
59TYPICAL USE:
60Include "gc.h" from the include subdirectory. Link against the
61appropriate library ("gc.a" under UN*X). Replace calls to malloc
62by calls to GC_MALLOC, and calls to realloc by calls to GC_REALLOC.
63If the object is known to never contain pointers, use GC_MALLOC_ATOMIC
64instead of GC_MALLOC.
65
66Define GC_DEBUG before including gc.h for additional checking.
67
68More documentation on the collector interface can be found at
69http://www.hpl.hp.com/personal/Hans_Boehm/gc/gcinterface.html,
70in doc/README, and in include/gc.h .
71
72WARNINGS:
73
74Do not store the only pointer to an object in memory allocated
75with system malloc, since the collector usually does not scan
76memory allocated in this way.
77
78Use with threads may be supported on your system, but requires the
79collector to be built with thread support. See Makefile. The collector
80does not guarantee to scan thread-local storage (e.g. of the kind
81accessed with pthread_getspecific()). The collector does scan
82thread stacks though, so generally the best solution is to ensure that
83any pointers stored in thread-local storage are also stored on the
84thread's stack for the duration of their lifetime.
85
Note: See TracBrowser for help on using the repository browser.