sync with w3m-0.2.2-inu-1.1/gc
This commit is contained in:
@@ -27,7 +27,7 @@ are GPL'ed, but with an exception that should cover all uses in the
|
||||
collector. (If you are concerned about such things, I recommend you look
|
||||
at the notice in config.guess or ltmain.sh.)
|
||||
|
||||
This is version 6.0 of a conservative garbage collector for C and C++.
|
||||
This is version 6.1alpha2 of a conservative garbage collector for C and C++.
|
||||
|
||||
You might find a more recent version of this at
|
||||
|
||||
|
||||
@@ -1360,7 +1360,7 @@ Since 6.0alpha8:
|
||||
it on untested platforms.
|
||||
- Integrated initial GNU HURD port. (Thanks to Chris Lingard and Igor
|
||||
Khavkine.)
|
||||
- A few more fixes for Digital Mars compiler.
|
||||
- A few more fixes for Digital Mars compiler (Walter Bright).
|
||||
- Fixed gcc version recognition. Renamed OPERATOR_NEW_ARRAY to
|
||||
GC_OPERATOR_NEW_ARRAY. Changed GC_OPERATOR_NEW_ARRAY to be the default.
|
||||
It can be overridden with -DGC_NO_OPERATOR_NEW_ARRAY. (Thanks to
|
||||
@@ -1378,16 +1378,71 @@ Since 6.0alpha9:
|
||||
- Fixed a stack clearing problem that resulted in SIGILL with a
|
||||
misaligned stack pointer for multithreaded SPARC builds.
|
||||
- Integrated another HURD patch (thanks to Igor Khavkine).
|
||||
|
||||
Since 6.0:
|
||||
- Non-debug, atomic allocations could result in bogus smashed object
|
||||
reports with debugging on. (Thanks to Patrick Doyle for the small
|
||||
test case.)
|
||||
- Fixed GC_get_register_stack_base (Itanium only) to work around a glibc
|
||||
2.2.4 bug.
|
||||
- Initial port to HP/UX on Itanium. Thread support and both 32 and 64
|
||||
bit ABIs appear to work. Parallel mark support doesn't yet, due to
|
||||
some inline assembly code issues. Thread local allocation does appear
|
||||
to work.
|
||||
- ifdef'ed out glibc2.1/Itanium workaround. I suspect nobody is using
|
||||
that combination anymore.
|
||||
- Added a patch to make new_gc_alloc.h usable with gcc3.0. (Thanks to
|
||||
Dimitris Vyzovitis for the patch.)
|
||||
- Debugged 64-bit support on HP/UX PA-RISC.
|
||||
- Turned on dynamic loading support for FreeBSD/ELF. (Thanks to Peter
|
||||
Housel.)
|
||||
- Unregistering of finalizers with debugging allocation was broken.
|
||||
(Thanks to Jani Kajala for the test case.)
|
||||
- Old finalizers were not returned correctly from GC_debug_register_finalizer.
|
||||
- Disabled MPROTECT_VDB for Linux/M68K based on a report that it doesn't work.
|
||||
- Cleaned up some statistics gathering code in reclaim.c (Thanks to Walter
|
||||
Bright.)
|
||||
- Added some support for OpenBSD/ELF/Linux. (Thanks to Suzuki Toshiya.)
|
||||
- Added Jakub Jelinek's patch to use dl_iterate_phdr for dynamic library
|
||||
traversal to dyn_load.c. Changed it to weakly reference dl_iterate_phdr,
|
||||
so that the old code is stilll used with old versions of glibc.
|
||||
- Cleaned up feature test macros for various threads packages and
|
||||
integrated (partially functional) FreeBSD threads code from Loren Rittle.
|
||||
It's likely that the cleanup broke something, since it touched lots of
|
||||
code. It's also likelly that it fixed some unreported bugs in the
|
||||
less common thread implementations, since some of the original code
|
||||
didn't stand up to close scrutiny. Support for the next pthreads
|
||||
implementation should be easier to add.
|
||||
Since 6.0alpha1:
|
||||
- No longer wrap read by default in multithreaded applications. It was
|
||||
pointed out on the libgcj list that this holds the allocation lock for
|
||||
way too long if the read blocks. For now, reads into the heap are
|
||||
broken with incremental collection. It's possible to turn this back on
|
||||
if you make sure that read calls don't block (e.g. by calling select
|
||||
first).
|
||||
- Fix ifdef in Solaris_threads.h to refer to GC_SOLARIS_THREADS.
|
||||
- Added check for environment variable GC_IGNORE_GCJ_INFO.
|
||||
- Added printing of stop-the-world GC times if GC_PRINT_STATS environment
|
||||
variable is set.
|
||||
- The calloc definition in leak_detector.h was missing parentheses, and
|
||||
realloc was missing a second argument to GC_REALLOC. (Thanks to Elrond.)
|
||||
- Added GC_PRINT_BACK_HEIGHT environment variable and associated
|
||||
code, mostly in the new file backgraph.c. See doc/README.environment.
|
||||
- Added -DUSE_GLOBAL_ALLOC to work around a Windows NT issue. (Thanks to
|
||||
Jonathan Clark.)
|
||||
- Integrated port to NEC EWS4800 (MIPS-based workstation, with somewhat
|
||||
different address-space layout). This may help for other machines with
|
||||
holes in the data segment. (Thanks to Hironori Sakamoto.)
|
||||
- Changed the order in which GC_push_roots and friends push things onto
|
||||
the mark stack. GC_push_all calls need to come first, since we can't
|
||||
necessarily recovere if thos overflow the mark stack. (Thanks to
|
||||
Matthew Flatt for tracking down the problem.)
|
||||
|
||||
|
||||
To do:
|
||||
- There seem to be outstanding issues on Solaris/X86, possibly with
|
||||
finding the data segment starting address. Information/patches would
|
||||
ne appreciated.
|
||||
- New_gc_alloc.h is apparently no longer compatible with the latest C++
|
||||
standard library in gcc3.0. (This isn't technically a bug, since it only
|
||||
claimed compatibility with the SGI STL. But we may need a new C++ STL
|
||||
allocator interface.)
|
||||
be appreciated.
|
||||
- Very large root set sizes (> 16 MB or so) could cause the collector
|
||||
to abort with an unexpected mark stack overflow. (Thanks again to
|
||||
Peter Chubb.) NOT YET FIXED. Workaround is to increase the initial
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
The garbage collector looks at a number of environment variables which are
|
||||
the used to affect its operation. These are examined only on Un*x-like
|
||||
then used to affect its operation. These are examined only on Un*x-like
|
||||
platforms.
|
||||
|
||||
GC_INITIAL_HEAP_SIZE=<bytes> - Initial heap size in bytes. May speed up
|
||||
@@ -32,6 +32,27 @@ GC_NPROCS=<n> - Linux w/threads only. Explicitly sets the number of processors
|
||||
GC_NO_BLACKLIST_WARNING - Prevents the collector from issuing
|
||||
"Needed to allocate blacklisted block at ..." warnings.
|
||||
|
||||
GC_IGNORE_GCJ_INFO - Ignore the type descriptors implicitly supplied by
|
||||
GC_gcj_malloc and friends. This is useful for debugging
|
||||
descriptor generation problems, and possibly for
|
||||
temporarily working around such problems. It forces a
|
||||
fully conservative scan of all heap objects except
|
||||
those known to be pointerfree, and may thus have other
|
||||
adverse effects.
|
||||
|
||||
GC_PRINT_BACK_HEIGHT - Print max length of chain through unreachable objects
|
||||
ending in a reachable one. If this number remains
|
||||
bounded, then the program is "GC robust". This ensures
|
||||
that a fixed number of misidentified pointers can only
|
||||
result in a bounded space leak. This currently only
|
||||
works if debugging allocation is used throughout.
|
||||
It increases GC space and time requirements appreciably.
|
||||
This feature is still somewhat experimental, and requires
|
||||
that the collector have been built with MAKE_BACK_GRAPH
|
||||
defined. For details, see Boehm, "Bounding Space Usage
|
||||
of Conservative Garbage Collectors", POPL 2001, or
|
||||
http://lib.hpl.hp.com/techpubs/2001/HPL-2001-251.html .
|
||||
|
||||
The following turn on runtime flags that are also program settable. Checked
|
||||
only during initialization. We expect that they will usually be set through
|
||||
other means, but this may help with debugging and testing:
|
||||
|
||||
75
gc/doc/README.ews4800
Normal file
75
gc/doc/README.ews4800
Normal file
@@ -0,0 +1,75 @@
|
||||
GC on EWS4800
|
||||
-------------
|
||||
|
||||
1. About EWS4800
|
||||
EWS4800 is 32bit/64bit workstation.
|
||||
|
||||
Vender: NEC Corporation
|
||||
OS: UX/4800 R9.* - R13.* (SystemV R4.2)
|
||||
CPU: R4000, R4400, R10000 (MIPS)
|
||||
|
||||
2. Compiler
|
||||
|
||||
32bit:
|
||||
Use ANSI C compiler.
|
||||
CC = /usr/abiccs/bin/cc
|
||||
|
||||
64bit:
|
||||
Use 64bit ANSI C compiler.
|
||||
CC = /usr/ccs64/bin/cc
|
||||
AR = /usr/ccs64/bin/ar
|
||||
|
||||
3. ELF file format
|
||||
*** Caution: The following infomation is empirical. ***
|
||||
|
||||
32bit:
|
||||
ELF file has an unique format. (See a.out(4) and end(3C).)
|
||||
|
||||
&_start
|
||||
: text segment
|
||||
&etext
|
||||
DATASTART
|
||||
: data segment (initialized)
|
||||
&edata
|
||||
DATASTART2
|
||||
: data segment (uninitialized)
|
||||
&end
|
||||
|
||||
Here, DATASTART and DATASTART2 are macros of GC, and are defined as
|
||||
the following equations. (See include/private/gcconfig.h.)
|
||||
The algorithm for DATASTART is similar with the function
|
||||
GC_SysVGetDataStart() in os_dep.c.
|
||||
|
||||
DATASTART = ((&etext + 0x3ffff) & ~0x3ffff) + (&etext & 0xffff)
|
||||
|
||||
Dynamically linked:
|
||||
DATASTART2 = (&_gp + 0x8000 + 0x3ffff) & ~0x3ffff
|
||||
|
||||
Statically linked:
|
||||
DATASTART2 = &edata
|
||||
|
||||
GC has to check addresses both between DATASTART and &edata, and
|
||||
between DATASTART2 and &end. If a program accesses between &etext
|
||||
and DATASTART, or between &edata and DATASTART2, the segmentation
|
||||
error occurs and the program stops.
|
||||
|
||||
If a program is statically linked, there is not a gap between
|
||||
&edata and DATASTART2. The global symbol &_DYNAMIC_LINKING is used
|
||||
for the detection.
|
||||
|
||||
64bit:
|
||||
ELF file has a simple format. (See end(3C).)
|
||||
|
||||
_ftext
|
||||
: text segment
|
||||
_etext
|
||||
_fdata = DATASTART
|
||||
: data segment (initialized)
|
||||
_edata
|
||||
_fbss
|
||||
: data segment (uninitialized)
|
||||
_end = DATAEND
|
||||
|
||||
--
|
||||
Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
The collector has at various times been compiled under Windows 95 & NT,
|
||||
with the original Microsoft SDK, with Visual C++ 2.0, 4.0, and 6, with
|
||||
the GNU win32 environment, with Borland 4.5, and recently with
|
||||
Watcom C. It is likely that some of these have been broken in the
|
||||
meantime. Patches are appreciated.
|
||||
the GNU win32 environment, with Borland 4.5, with Watcom C, and recently
|
||||
with the Digital Mars compiler. It is likely that some of these have been
|
||||
broken in the meantime. Patches are appreciated.
|
||||
|
||||
It runs under both win32s and win32, but with different semantics.
|
||||
Under win32, all writable pages outside of the heaps and stack are
|
||||
@@ -45,6 +45,13 @@ window colors.)
|
||||
In general -DREDIRECT_MALLOC is unlikely to work unless the
|
||||
application is completely statically linked.
|
||||
|
||||
The collector normally allocates memory from the OS with VirtualAlloc.
|
||||
This appears to cause problems under Windows NT and Windows 2000 (but
|
||||
not Windows 95/98) if the memory is later passed to CreateDIBitmap.
|
||||
To work around this problem, build the collector with -DUSE_GLOBAL_ALLOC.
|
||||
This is currently incompatible with -DUSE_MUNMAP. (Thanks to Jonathan
|
||||
Clark for tracking this down.)
|
||||
|
||||
For Microsoft development tools, rename NT_MAKEFILE as
|
||||
MAKEFILE. (Make sure that the CPU environment variable is defined
|
||||
to be i386.) In order to use the gc_cpp.h C++ interface, all
|
||||
|
||||
@@ -209,6 +209,8 @@ down the problem:
|
||||
<OL>
|
||||
<LI> If you are using the incremental collector try turning it off for
|
||||
debugging.
|
||||
<LI> If you are using shared libraries, try linking statically. If that works,
|
||||
ensure that DYNAMIC_LOADING is defined on your platform.
|
||||
<LI> Try to reproduce the problem with fully debuggable unoptimized code.
|
||||
This will eliminate the last possibility, as well as making debugging easier.
|
||||
<LI> Try replacing any suspect typed allocation and <TT>GC_malloc_atomic</tt>
|
||||
|
||||
Reference in New Issue
Block a user