Al Dosser (dosser@src.dec.com) and Regis Cridlig (Regis.Cridlig@cl.cam.ac.uk)
subsequently provided updates and information on variation between ULTRIX
systems. Parag Patel (parag@netcom.com) supplied the A/UX code.
-Jesper Peterson(jep@mtiame.mtia.oz.au), Michel Schinz, and
+Jesper Peterson(jep@mtiame.mtia.oz.au), Michel Schinz <schinz@alphanet.ch>, and
Martin Tauchmann (martintauchmann@bigfoot.com) supplied the Amiga port.
Thomas Funke (thf@zelator.in-berlin.de(?)) and
Brian D.Carlstrom (bdc@clark.lcs.mit.edu) supplied the NeXT ports.
More contributors:
Andrej Cedilnik <acedil1@csee.umbc.edu>
-Bradley D. LaRonde
+Bradley D. LaRonde <brad@ltc.com>
+Brian Alliet <brian@brianweb.net>
+Dave Barrett <barrett@asgard.cs.colorado.edu>
+Dietmar Planitzer <dave.pl@ping.at>
+Gary Leavens <leavens@eecs.ucf.edu>
Grzegorz Jakacki <jakacki@acm.org>
-Margaret Fleck
+Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+Ivan Demakov <ivan@tgrad.nsk.su>
+Kjetil S. Matheussen <ksvalast@ifi.uio.no>
+Lars Farm <lars.farm@ite.mh.se>
+Ludovic Courtes <ludo@gnu.org>
+Margaret Fleck <mfleck@illinois.edu>
Oliver Kurth <oliver.kurth@innominate.com>
+Patrick C. Beard <beard@netscape.com>
Petter Urkedal <paurkedal@gmail.com>
Rob Haack <rhaack@polaris.unm.edu>
+Takis Psarogiannakopoulos <takis@xfree86.org>
Tilman Vogel <Tilman.Vogel@web.de>
-Tom Tromey
+Tom Tromey <tromey@cygnus.com>
+Xiaokun Zhu <xiaokun@aero.gla.ac.uk>
doesn't cut it.
Some C optimizers may lose the last undisguised pointer to a memory
object as a consequence of clever optimizations. This has almost
-never been observed in practice. Send mail to boehm@acm.org
-for suggestions on how to fix your compiler.
+never been observed in practice.
This is not a real-time collector. In the standard configuration,
percentage of time required for collection should be constant across
heap sizes. But collection pauses will increase for larger heaps.
per MB of accessible memory that needs to be scanned and processor.
Your mileage may vary.) The incremental/generational collection facility
may help in some cases.
- Please address bug reports to boehm@acm.org. If you are
+ Please address bug reports to gc@linux.hpl.hp.com. If you are
contemplating a major addition, you might also send mail to ask whether
it's already been done (or whether we tried and discarded it).
mark (aka --enable-parallel-mark) makes a BIG difference.
Takis Psarogiannakopoulos
- University of Cambridge
- Centre for Mathematical Sciences
- Department of Pure Mathematics
- Wilberforce Road
- Cambridge CB3 0WB ,UK , <takis@XFree86.Org>
- January 2002
-
Note (HB):
The integration of this patch is currently not complete.
for you, great. If it doesn't, sorry, try again...;-) Still, if you find
errors, please let me know.
- mailto: lars.farm@ite.mh.se
-
- address: Lars Farm
- Krönvägen 33b
- 856 44 Sundsvall
- Sweden
Porting to MacOS is a bit more complex than it first seems. Which MacOS?
68K/PowerPC? Which compiler? Each supports both 68K and PowerPC and offer a
#include <ansi_prefix.mac.h>
#undef NDEBUG
-#define ALL_INTERIOR_POINTERS /* for GC_priv.h */
+#define ALL_INTERIOR_POINTERS /* for GC_priv.h */
---- ( cut here ) ----
3) Test that the C++ interface 'gc_cpp.cc/h' works with 'test_cpp.cc'.
It worked for me, hope it works for you.
Lars Farm
- 18 July 1997
----------------------------------------------------------------------------
-------
To test the collector (always a good idea), build one of the gctest projects,
-gctest.¹ (Symantec C++/THINK C), mw/gctest.68K.¹, or mw/gctest.PPC.¹. The
+gctest. (Symantec C++/THINK C), mw/gctest.68K, or mw/gctest.PPC. The
test will ask you how many times to run; 1 should be sufficient.
-Building
+Building
--------
For your convenience project files for the major Macintosh development
systems are provided.
-For Symantec C++/THINK C, you must build the two projects gclib-1.¹ and
-gclib-2.¹. It has to be split up because the collector has more than 32k
+For Symantec C++/THINK C, you must build the two projects gclib-1 and
+gclib-2. It has to be split up because the collector has more than 32k
of static data and no library can have more than this in the Symantec
environment. (Future versions will probably fix this.)
-For Metrowerks C/C++ 4.5 you build gc.68K.¹/gc.PPC.¹ and the result will
+For Metrowerks C/C++ 4.5 you build gc.68K/PPC and the result will
be a library called gc.68K.lib/gc.PPC.lib.
Using
-----
-Under Symantec C++/THINK C, you can just add the gclib-1.¹ and gclib-2.¹
+Under Symantec C++/THINK C, you can just add the gclib-1 and gclib-2
projects to your own project. Under Metrowerks, you add gc.68K.lib or
gc.PPC.lib and two additional files. You add the files called datastart.c
and dataend.c to your project, bracketing all files that use the collector.
-See mw/gctest.¹ for an example.
+See mw/gctest for an example.
Include the projects/libraries you built above into your own project,
#include "gc.h", and call GC_malloc. You don't have to call GC_free.
-
Patrick C. Beard
-January 4, 1995
no effect if this flag is set.
GC_AMIGA_GC - If gc returns NULL, do a GC_gcollect, and try again. This
- usually is a success with the standard GC configuration.
+ usually is a success with the standard GC configuration.
It is allso the most important flag to set to prevent
GC from returning chip-mem. Beware that it slows down a lot
when a program is rapidly allocating/deallocating when
tested with software: Radium, http://www.stud.ifi.uio.no/~ksvalast/radium/
-
tested with hardware: MC68060
--ksvalast@ifi.uio.no
-
-
===========================================================================
- Martin Tauchmann's notes (1-Apr-99)
+ Martin Tauchmann's notes (1-Apr-99)
===========================================================================
Works now, also with the GNU-C compiler V2.7.2.1. <ftp://ftp.unina.it/pub/amiga/geekgadgets/amiga/m68k/snapshots/971125/amiga-bin/>
MC68030
-CONTACT
-
-Please, contact me at <martintauchmann@bigfoot.com>, when you change the
-Amiga port. <http://martintauchmann.home.pages.de>
-
===========================================================================
- Michel Schinz's notes
+ Michel Schinz's notes
===========================================================================
WHO DID WHAT
is loaded in memory, whether a segment is a code or a data segment,
please let me know.
-PROBLEMS
-
-If you have any problem with this version, please contact me at
-schinz@alphanet.ch (but do *not* send long files, since we pay for
-every mail!).
===========================================================================
- Jesper Peterson's notes
+ Jesper Peterson's notes
===========================================================================
ADDITIONAL NOTES FOR AMIGA PORT
with a 68030 I think).
-----------------------------------------------------------------------
-
-The Amiga port has been brought to you by:
-
-Jesper Peterson.
-
-jep@mtiame.mtia.oz.au (preferred, but 1 week turnaround)
-jep@orca1.vic.design.telecom.au (that's orca<one>, 1 day turnaround)
-
-At least one of these addresses should be around for a while, even
-though I don't work for either of the companies involved.
-
provided the above notices are retained, and a notice that the code was
modified is included with the above copyright notice.
-Please send bug reports to Hans-J. Boehm (Hans_Boehm@hp.com or
-boehm@acm.org).
+Please send bug reports to Hans-J. Boehm.
This is a string packages that uses a tree-based representation.
See cord.h for a description of the functions provided. Ec.h describes
break on some platforms, notably PowerPC. It should be possible to
build the remainder of the library (everything but cordprnt.c) on
any platform that supports the collector.
-
Darwin/OS X port.
-Brian Alliet
-brian@brianweb.net
gc_cpp.h usage
==============
June, 1 2000
Dietmar Planitzer
-dave.pl@ping.at
Note from Andrew Begel:
-[Original version supplied by Xiaokun Zhu <xiaokun@aero.gla.ac.uk>]
-[This version came mostly from Gary Leavens. ]
Look first at Makefile.dj, and possibly change the definitions of
RM and MV if you don't have rm and mv installed.
Then use Makefile.dj to compile the garbage collector.
For example, you can do:
- make -f Makefile.dj test
+ make -f Makefile.dj test
All the tests should work fine.
-
_end = DATAEND
--
-Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+Hironori SAKAMOTO
When using the new "configure; make" build process, please
run configure with the --disable-shared option. "Make check" does not
yet pass with dynamic libraries. Ther reasons for that are not yet
understood. (HB, paraphrasing message from Hironori SAKAMOTO.)
-
You should see either a failure indication or a "Collector appears to
work" message.
-If you would prefer a VC++.NET project file, ask boehm@acm.org. One has
+If you would prefer a VC++ .NET project file, ask Hans Boehm. One has
been contributed, but it seems to contain some absolute paths etc., so
it can presumably only be a starting point, and is not in the standard
distribution. It is unclear (to me, Hans Boehm) whether it is feasible to
including "gc.h" (for example, with -DGC_DLL compiler option). It's
important, otherwise resulting programs will not run.
-Ivan Demakov (email: ivan@tgrad.nsk.su)
-
-Note from Ivan Maidanski:
Special note for OpenWatcom users: the C (unlike the C++) compiler (of the
latest stable release, not sure for older ones) doesn't force pointer global
This is an ASCII diagram of the data structure used to check pointer
-validity. It was provided by Dave Barrett <barrett@asgard.cs.colorado.edu>,
+validity. It was provided by Dave Barrett,
and should be of use to others attempting to understand the code.
The data structure in GC4.X is essentially the same. -HB
- Data Structure used by GC_base in gc3.7:
- 21-Apr-94
-
-
+ Data Structure used by GC_base in gc3.7:
+ 21-Apr-94
+
+
63 LOG_TOP_SZ[11] LOG_BOTTOM_SZ[10] LOG_HBLKSIZE[13]
p:| | TL_HASH(hi) | | HBLKDISPL(p) |
+------------------+----------------+------------------+------------------+
\-----------------------HBLKPTR(p)-------------------/
- \------------hi-------------------/
+ \------------hi-------------------/
\______ ________/ \________ _______/ \________ _______/
V V V
| | |
- GC_top_index[] | | |
- --- +--------------+ | | |
- ^ | | | | |
- | | | | | |
- TOP +--------------+<--+ | |
- _SZ +-<| [] | * | |
-(items)| +--------------+ if 0 < bi< HBLKSIZE | |
- | | | | then large object | |
- | | | | starts at the bi'th | |
- v | | | HBLK before p. | i |
- --- | +--------------+ | (word- |
- v | aligned) |
- bi= |GET_BI(p){->hash_link}->key==hi | |
- v | |
- | (bottom_index) \ scratch_alloc'd | |
- | ( struct bi ) / by get_index() | |
- --- +->+--------------+ | |
+ GC_top_index[] | | |
+ --- +--------------+ | | |
+ ^ | | | | |
+ | | | | | |
+ TOP +--------------+<--+ | |
+ _SZ +-<| [] | * | |
+(items)| +--------------+ if 0 < bi< HBLKSIZE | |
+ | | | | then large object | |
+ | | | | starts at the bi'th | |
+ v | | | HBLK before p. | i |
+ --- | +--------------+ | (word- |
+ v | aligned) |
+ bi= |GET_BI(p){->hash_link}->key==hi | |
+ v | |
+ | (bottom_index) \ scratch_alloc'd | |
+ | ( struct bi ) / by get_index() | |
+ --- +->+--------------+ | |
^ | | | |
^ | | | |
BOTTOM | | ha=GET_HDR_ADDR(p) | |
_SZ(items)+--------------+<----------------------+ +-------+
- | +--<| index[] | |
- | | +--------------+ GC_obj_map: v
- | | | | from / +-+-+-----+-+-+-+-+ ---
- v | | | GC_add < 0| | | | | | | | ^
- --- | +--------------+ _map_entry \ +-+-+-----+-+-+-+-+ |
+ | +--<| index[] | |
+ | | +--------------+ GC_obj_map: v
+ | | | | from / +-+-+-----+-+-+-+-+ ---
+ v | | | GC_add < 0| | | | | | | | ^
+ --- | +--------------+ _map_entry \ +-+-+-----+-+-+-+-+ |
| | asc_link | +-+-+-----+-+-+-+-+ MAXOBJSZ
- | +--------------+ +-->| | | j | | | | | +1
- | | key | | +-+-+-----+-+-+-+-+ |
- | +--------------+ | +-+-+-----+-+-+-+-+ |
- | | hash_link | | | | | | | | | | v
+ | +--------------+ +-->| | | j | | | | | +1
+ | | key | | +-+-+-----+-+-+-+-+ |
+ | +--------------+ | +-+-+-----+-+-+-+-+ |
+ | | hash_link | | | | | | | | | | v
| +--------------+ | +-+-+-----+-+-+-+-+ ---
- | | |<--MAX_OFFSET--->|
+ | | |<--MAX_OFFSET--->|
| | (bytes)
-HDR(p)| GC_find_header(p) | |<--MAP_ENTRIES-->|
- | \ from | =HBLKSIZE/WORDSZ
+HDR(p)| GC_find_header(p) | |<--MAP_ENTRIES-->|
+ | \ from | =HBLKSIZE/WORDSZ
| (hdr) (struct hblkhdr) / alloc_hdr() | (1024 on Alpha)
+-->+----------------------+ | (8/16 bits each)
-GET_HDR(p)| word hb_sz (words) | |
- +----------------------+ |
+GET_HDR(p)| word hb_sz (words) | |
+ +----------------------+ |
| struct hblk *hb_next | |
- +----------------------+ |
+ +----------------------+ |
|mark_proc hb_mark_proc| |
+----------------------+ |
| char * hb_map |>-------------+
- +----------------------+
- | ushort hb_obj_kind |
- +----------------------+
- | hb_last_reclaimed |
- --- +----------------------+
+ +----------------------+
+ | ushort hb_obj_kind |
+ +----------------------+
+ | hb_last_reclaimed |
+ --- +----------------------+
^ | |
MARK_BITS| hb_marks[] | *if hdr is free, hb_sz + DISCARD_WORDS
_SZ(words)| | is the size of a heap chunk (struct hblk)
v | | of at least MININCR*HBLKSIZE bytes (below),
--- +----------------------+ otherwise, size of each object in chunk.
-Dynamic data structures above are interleaved throughout the heap in blocks of
+Dynamic data structures above are interleaved throughout the heap in blocks of
size MININCR * HBLKSIZE bytes as done by gc_scratch_alloc which cannot be
freed; free lists are used (e.g. alloc_hdr). HBLKs's below are collected.
- (struct hblk)
+ (struct hblk)
--- +----------------------+ < HBLKSIZE --- --- DISCARD_
^ |garbage[DISCARD_WORDS]| aligned ^ ^ HDR_BYTES WORDS
| | | | v (bytes) (words)
- | +-----hb_body----------+ < WORDSZ | --- ---
+ | +-----hb_body----------+ < WORDSZ | --- ---
| | | aligned | ^ ^
| | Object 0 | | hb_sz |
| | | i |(word- (words)|
| | | (bytes)|aligned) v |
| + - - - - - - - - - - -+ --- | --- |
| | | ^ | ^ |
- n * | | j (words) | hb_sz BODY_SZ
+ n * | | j (words) | hb_sz BODY_SZ
HBLKSIZE | Object 1 | v v | (words)
(bytes) | |--------------- v MAX_OFFSET
| + - - - - - - - - - - -+ --- (bytes)
# define NOSYS
# define mach_type_known
# endif
-/* Ivan Demakov */
+
# if defined(__WATCOMC__) && defined(__386__)
# define I386
# if !defined(OS2) && !defined(MSWIN32) && !defined(DOS4GW)
# define ALIGNMENT 4
/* Appears to hold for all "32 bit" compilers */
/* except Borland. The -a4 option fixes */
- /* Borland. */
- /* Ivan Demakov: For Watcom the option is -zp4. */
+ /* Borland. For Watcom the option is -zp4. */
# endif
# ifdef SEQUENT
# define OS_TYPE "SEQUENT"
* other Posix thread implementations. We are trying to merge
* all flavors of pthread support code into this file.
*/
- /* DG/UX ix86 support <takis@xfree86.org> */
+
/*
* Linux_threads.c now also includes some code to support HPUX and
* OSF1 (Compaq Tru64 Unix, really). The OSF1 support is based on Eric Benson's
/* Return the number of processors, or i<= 0 if it can't be determined. */
STATIC int GC_get_nprocs(void)
{
- /* <takis@XFree86.Org> */
int numCpus;
struct dg_sys_info_pm_info pm_sysinfo;
int status = 0;
/*
- * Copyright (C) 2011 Ludovic Courtes <ludo@gnu.org>
+ * Copyright (C) 2011 Ludovic Courtes
*
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
* OR IMPLIED. ANY USE IS AT YOUR OWN RISK.