Blame README.QUICK

Packit d28291
Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
Packit d28291
Copyright (c) 1991-1995 by Xerox Corporation.  All rights reserved.
Packit d28291
Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
Packit d28291
Copyright (c) 1999-2001 by Hewlett-Packard. All rights reserved.
Packit d28291
Packit d28291
THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
Packit d28291
OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
Packit d28291
Packit d28291
Permission is hereby granted to use or copy this program
Packit d28291
for any purpose,  provided the above notices are retained on all copies.
Packit d28291
Permission to modify the code and to distribute modified code is granted,
Packit d28291
provided the above notices are retained, and a notice that the code was
Packit d28291
modified is included with the above copyright notice.
Packit d28291
Packit d28291
A few files have other copyright holders. A few of the files needed
Packit d28291
to use the GNU-style build procedure come with a modified GPL license
Packit d28291
that appears not to significantly restrict use of the collector, though
Packit d28291
use of those files for a purpose other than building the collector may
Packit d28291
require the resulting code to be covered by the GPL.
Packit d28291
Packit d28291
For more details and the names of other contributors, see the README.md,
Packit d28291
doc/README.*, AUTHORS and include/gc.h files.  These files describe typical
Packit d28291
use of the collector on a machine that is already supported.
Packit d28291
Packit d28291
For the version number, see README.md or include/gc_version.h files.
Packit d28291
Packit d28291
INSTALLATION:
Packit d28291
Under UN*X, Linux:
Packit d28291
Alternative 1 (the old way): type "make -f Makefile.direct check".
Packit d28291
        Link against gc.a.
Packit d28291
Packit d28291
Alternative 2 (the new way): type
Packit d28291
        "./configure --prefix=<dir>; make; make check; make install".
Packit d28291
        Link against <dir>/lib/libgc.a or <dir>/lib/libgc.so.
Packit d28291
        See doc/README.autoconf for details
Packit d28291
Packit d28291
Under Windows 95, 98, Me, NT, or 2000:
Packit d28291
copy the appropriate makefile to MAKEFILE, read it, and type "nmake test".
Packit d28291
(Under Windows, this assumes you have Microsoft command-line tools
Packit d28291
installed, and suitably configured.)
Packit d28291
Read the machine specific README.XXX in the doc directory if one exists.
Packit d28291
Packit d28291
If you need thread support, you will need to follow the special
Packit d28291
platform-dependent instructions (win32), or define GC_THREADS
Packit d28291
as described in doc/README.macros, or possibly use
Packit d28291
--enable-threads=posix when running the configure script.
Packit d28291
Packit d28291
If you wish to use the cord (structured string) library with the stand-alone
Packit d28291
Makefile.direct, type "make -f Makefile.direct cords".
Packit d28291
(This requires an ANSI C compiler.  You may
Packit d28291
need to redefine CC in the Makefile. The CORD_printf implementation in
Packit d28291
cordprnt.c is known to be less than perfectly portable.  The rest of the
Packit d28291
package should still work.)  See include/cord.h for the API.
Packit d28291
Packit d28291
If you wish to use the collector from C++, type "make c++", or use
Packit d28291
--enable-cplusplus with the configure script.   With Makefile.direct,
Packit d28291
these ones add further files to gc.a and to the include subdirectory.
Packit d28291
With the alternate build process, this generates libgccpp.
Packit d28291
See include/gc_cpp.h.
Packit d28291
Packit d28291
TYPICAL USE:
Packit d28291
Include "gc.h" from the include subdirectory.  Link against the
Packit d28291
appropriate library ("gc.a" under UN*X).  Replace calls to malloc
Packit d28291
by calls to GC_MALLOC, and calls to realloc by calls to GC_REALLOC.
Packit d28291
If the object is known to never contain pointers, use GC_MALLOC_ATOMIC
Packit d28291
instead of GC_MALLOC.
Packit d28291
Packit d28291
Define GC_DEBUG before including gc.h for additional checking.
Packit d28291
Packit d28291
More documentation on the collector interface can be found in README.md,
Packit d28291
doc/gcinterface.html, include/gc.h, and other files in the doc directory.
Packit d28291
Packit d28291
WARNINGS:
Packit d28291
Packit d28291
Do not store the only pointer to an object in memory allocated
Packit d28291
with system malloc, since the collector usually does not scan
Packit d28291
memory allocated in this way.
Packit d28291
Packit d28291
Use with threads may be supported on your system, but requires the
Packit d28291
collector to be built with thread support.  See Makefile.  The collector
Packit d28291
does not guarantee to scan thread-local storage (e.g. of the kind
Packit d28291
accessed with pthread_getspecific()).  The collector does scan
Packit d28291
thread stacks though, so generally the best solution is to ensure that
Packit d28291
any pointers stored in thread-local storage are also stored on the
Packit d28291
thread's stack for the duration of their lifetime.