X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmm%2Fboehm-gc%2Fdoc%2Fgcinterface.html;h=bb0995d86f1dd29d024dae36fb3befd3ca8ef1d6;hb=c83bff94e40ee0a218a39931af17814d1a42cb5c;hp=312d37f417f9a8734fffe6870d18468daba50a05;hpb=db5750e3eaf39a47dbccccfe7cdd180fb686aac6;p=cacao.git diff --git a/src/mm/boehm-gc/doc/gcinterface.html b/src/mm/boehm-gc/doc/gcinterface.html index 312d37f41..bb0995d86 100644 --- a/src/mm/boehm-gc/doc/gcinterface.html +++ b/src/mm/boehm-gc/doc/gcinterface.html @@ -1,5 +1,7 @@ - + + + Garbage Collector Interface @@ -8,7 +10,8 @@ On many platforms, a single-threaded garbage collector library can be built to act as a plug-in malloc replacement. (Build with -DREDIRECT_MALLOC=GC_malloc -DIGNORE_FREE.) This is often the best way to deal with third-party libraries -which leak or prematurely free objects. -DREDIRECT_MALLOC is intended +which leak or prematurely free objects. +-DREDIRECT_MALLOC=GC_malloc is intended primarily as an easy way to adapt old code, not for new development.

New code should use the interface discussed below. @@ -47,7 +50,9 @@ Allocates and clears nbytes of storage. Requires (amortized) time proportional to nbytes. The resulting object will be automatically deallocated when unreferenced. References from objects allocated with the system malloc are usually not -considered by the collector. (See GC_MALLOC_UNCOLLECTABLE, however.) +considered by the collector. (See GC_MALLOC_UNCOLLECTABLE, however. +Building the collector with -DREDIRECT_MALLOC=GC_malloc_uncollectable +is often a way around this.) GC_MALLOC is a macro which invokes GC_malloc by default or, if GC_DEBUG is defined before gc.h is included, a debugging version that checks @@ -152,8 +157,15 @@ for details.

If you are concerned with multiprocessor performance and scalability, -you should consider enabling and using thread local allocation (e.g. -GC_LOCAL_MALLOC, see gc_local_alloc.h. If your platform +you should consider enabling and using thread local allocation. +For GC versions before 7.0, use e.g. +GC_LOCAL_MALLOC and see gc_local_alloc.h; +for later versions enabling thread-local allocations when the collector +library is built changes the +implementation of GC_MALLOC, so the client doesn't need to +change. +

+If your platform supports it, you should build the collector with parallel marking support (-DPARALLEL_MARK, or --enable-parallel-mark).