]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/src/engine/boehm_gc/README.QUICK
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / build / src / engine / boehm_gc / README.QUICK
CommitLineData
7c673cae
FG
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. With the most recent GC distributions
31 you may have to copy Makefile.direct to Makefile first.
32
33Alternative 2 (the new way): type
34 "./configure --prefix=<dir>; make; make check; make install".
35 Link against <dir>/lib/libgc.a or <dir>/lib/libgc.so.
36 See README.autoconf for details
37
38Under Windows 95, 98, Me, NT, or 2000:
39copy the appropriate makefile to MAKEFILE, read it, and type "nmake test".
40(Under Windows, this assumes you have Microsoft command-line tools
41installed, and suitably configured.)
42Read the machine specific README in the doc directory if one exists.
43
44If you need thread support, you will need to follow the special
45platform-dependent instructions (win32), or define GC_THREADS
46as described in Makefile (Makefile.direct), or possibly use
47--enable-threads=posix when running the configure script.
48
49If you wish to use the cord (structured string) library with the stand-alone
50Makefile.direct, type "make cords", after copying to "Makefile".
51(This requires an ANSI C compiler. You may
52need to redefine CC in the Makefile. The CORD_printf implementation in
53cordprnt.c is known to be less than perfectly portable. The rest of the
54package should still work.)
55
56If you wish to use the collector from C++, type "make c++", or use
57--enable-cplusplus with the configure script. With Makefile.direct,
58hese add further files to gc.a and to the include subdirectory. With the
59alternat build process,this generates libgccpp.
60See cord/cord.h and include/gc_cpp.h.
61
62TYPICAL USE:
63Include "gc.h" from the include subdirectory. Link against the
64appropriate library ("gc.a" under UN*X). Replace calls to malloc
65by calls to GC_MALLOC, and calls to realloc by calls to GC_REALLOC.
66If the object is known to never contain pointers, use GC_MALLOC_ATOMIC
67instead of GC_MALLOC.
68
69Define GC_DEBUG before including gc.h for additional checking.
70
71More documentation on the collector interface can be found at
72http://www.hpl.hp.com/personal/Hans_Boehm/gc/gcinterface.html,
73in doc/README and other files in the doc directory, and in include/gc.h .
74
75WARNINGS:
76
77Do not store the only pointer to an object in memory allocated
78with system malloc, since the collector usually does not scan
79memory allocated in this way.
80
81Use with threads may be supported on your system, but requires the
82collector to be built with thread support. See Makefile. The collector
83does not guarantee to scan thread-local storage (e.g. of the kind
84accessed with pthread_getspecific()). The collector does scan
85thread stacks though, so generally the best solution is to ensure that
86any pointers stored in thread-local storage are also stored on the
87thread's stack for the duration of their lifetime.
88