/* Public read-only variables */
/* The supplied getter functions are preferred for new code. */
-GC_API GC_word GC_gc_no;/* Counter incremented per collection. */
+GC_API GC_ATTR_DEPRECATED GC_word GC_gc_no;
+ /* Counter incremented per collection. */
/* Includes empty GCs at startup. */
GC_API GC_word GC_CALL GC_get_gc_no(void);
/* GC_get_gc_no() is unsynchronized, so */
/* avoid data races on multiprocessors. */
#ifdef GC_THREADS
- GC_API int GC_parallel;
+ GC_API GC_ATTR_DEPRECATED int GC_parallel;
/* GC is parallelized for performance on */
/* multiprocessors. Currently set only */
/* implicitly if collector is built with */
/* The supplied setter and getter functions are preferred for new code. */
typedef void * (GC_CALLBACK * GC_oom_func)(size_t /* bytes_requested */);
-GC_API GC_oom_func GC_oom_fn;
+GC_API GC_ATTR_DEPRECATED GC_oom_func GC_oom_fn;
/* When there is insufficient memory to satisfy */
/* an allocation request, we return */
/* (*GC_oom_fn)(size). By default this just */
GC_API GC_oom_func GC_CALL GC_get_oom_fn(void);
typedef void (GC_CALLBACK * GC_on_heap_resize_proc)(GC_word /* new_size */);
-GC_API GC_on_heap_resize_proc GC_on_heap_resize;
+GC_API GC_ATTR_DEPRECATED GC_on_heap_resize_proc GC_on_heap_resize;
/* Invoked when the heap grows or shrinks. */
/* Called with the world stopped (and the */
/* allocation lock held). May be 0. */
/* Both the supplied setter and the getter */
/* acquire the GC lock (to avoid data races). */
-GC_API int GC_find_leak;
+GC_API GC_ATTR_DEPRECATED int GC_find_leak;
/* Do not actually garbage collect, but simply */
/* report inaccessible memory that was not */
/* deallocated with GC_free. Initial value */
GC_API void GC_CALL GC_set_find_leak(int);
GC_API int GC_CALL GC_get_find_leak(void);
-GC_API int GC_all_interior_pointers;
+GC_API GC_ATTR_DEPRECATED int GC_all_interior_pointers;
/* Arrange for pointers to object interiors to */
/* be recognized as valid. Typically should */
/* not be changed after GC initialization (in */
GC_API void GC_CALL GC_set_all_interior_pointers(int);
GC_API int GC_CALL GC_get_all_interior_pointers(void);
-GC_API int GC_finalize_on_demand;
+GC_API GC_ATTR_DEPRECATED int GC_finalize_on_demand;
/* If nonzero, finalizers will only be run in */
/* response to an explicit GC_invoke_finalizers */
/* call. The default is determined by whether */
GC_API void GC_CALL GC_set_finalize_on_demand(int);
GC_API int GC_CALL GC_get_finalize_on_demand(void);
-GC_API int GC_java_finalization;
+GC_API GC_ATTR_DEPRECATED int GC_java_finalization;
/* Mark objects reachable from finalizable */
/* objects in a separate post-pass. This makes */
/* it a bit safer to use non-topologically- */
GC_API int GC_CALL GC_get_java_finalization(void);
typedef void (GC_CALLBACK * GC_finalizer_notifier_proc)(void);
-GC_API GC_finalizer_notifier_proc GC_finalizer_notifier;
+GC_API GC_ATTR_DEPRECATED GC_finalizer_notifier_proc GC_finalizer_notifier;
/* Invoked by the collector when there are */
/* objects to be finalized. Invoked at most */
/* once per GC cycle. Never invoked unless */
GC_API void GC_CALL GC_set_finalizer_notifier(GC_finalizer_notifier_proc);
GC_API GC_finalizer_notifier_proc GC_CALL GC_get_finalizer_notifier(void);
-GC_API int GC_dont_gc; /* != 0 ==> Don't collect. In versions 6.2a1+, */
+GC_API GC_ATTR_DEPRECATED int GC_dont_gc;
+ /* != 0 ==> Don't collect. In versions 6.2a1+, */
/* this overrides explicit GC_gcollect() calls. */
/* Used as a counter, so that nested enabling */
/* and disabling work correctly. Should */
/* GC is disabled, GC_is_disabled() is */
/* preferred for new code. */
-GC_API int GC_dont_expand;
- /* Don't expand the heap unless explicitly */
+GC_API GC_ATTR_DEPRECATED int GC_dont_expand;
+ /* Do not expand the heap unless explicitly */
/* requested or forced to. The setter and */
/* getter are unsynchronized. */
GC_API void GC_CALL GC_set_dont_expand(int);
GC_API int GC_CALL GC_get_dont_expand(void);
-GC_API int GC_use_entire_heap;
+GC_API GC_ATTR_DEPRECATED int GC_use_entire_heap;
/* Causes the non-incremental collector to use the */
/* entire heap before collecting. This was the only */
/* option for GC versions < 5.0. This sometimes */
/* frequencies, and hence fewer instructions executed */
/* in the collector. */
-GC_API int GC_full_freq; /* Number of partial collections between */
+GC_API GC_ATTR_DEPRECATED int GC_full_freq;
+ /* Number of partial collections between */
/* full collections. Matters only if */
/* GC_incremental is set. */
/* Full collections are also triggered if */
GC_API void GC_CALL GC_set_full_freq(int);
GC_API int GC_CALL GC_get_full_freq(void);
-GC_API GC_word GC_non_gc_bytes;
+GC_API GC_ATTR_DEPRECATED GC_word GC_non_gc_bytes;
/* Bytes not considered candidates for */
/* collection. Used only to control scheduling */
/* of collections. Updated by */
GC_API void GC_CALL GC_set_non_gc_bytes(GC_word);
GC_API GC_word GC_CALL GC_get_non_gc_bytes(void);
-GC_API int GC_no_dls;
+GC_API GC_ATTR_DEPRECATED int GC_no_dls;
/* Don't register dynamic library data segments. */
/* Wizards only. Should be used only if the */
/* application explicitly registers all roots. */
GC_API void GC_CALL GC_set_no_dls(int);
GC_API int GC_CALL GC_get_no_dls(void);
-GC_API GC_word GC_free_space_divisor;
+GC_API GC_ATTR_DEPRECATED GC_word GC_free_space_divisor;
/* We try to make sure that we allocate at */
/* least N/GC_free_space_divisor bytes between */
/* collections, where N is twice the number */
GC_API void GC_CALL GC_set_free_space_divisor(GC_word);
GC_API GC_word GC_CALL GC_get_free_space_divisor(void);
-GC_API GC_word GC_max_retries;
+GC_API GC_ATTR_DEPRECATED GC_word GC_max_retries;
/* The maximum number of GCs attempted before */
/* reporting out of memory after heap */
/* expansion fails. Initially 0. */
GC_API GC_word GC_CALL GC_get_max_retries(void);
-GC_API char *GC_stackbottom; /* Cool end of user stack. */
+GC_API GC_ATTR_DEPRECATED char *GC_stackbottom;
+ /* Cool end of user stack. */
/* May be set in the client prior to */
/* calling any GC_ routines. This */
/* avoids some overhead, and */
/* GC_call_with_gc_active() and */
/* GC_register_my_thread() instead. */
-GC_API int GC_dont_precollect; /* Don't collect as part of GC */
+GC_API GC_ATTR_DEPRECATED int GC_dont_precollect;
+ /* Do not collect as part of GC */
/* initialization. Should be set only */
/* if the client wants a chance to */
/* manually initialize the root set */
GC_API void GC_CALL GC_set_dont_precollect(int);
GC_API int GC_CALL GC_get_dont_precollect(void);
-GC_API unsigned long GC_time_limit;
+GC_API GC_ATTR_DEPRECATED unsigned long GC_time_limit;
/* If incremental collection is enabled, */
/* We try to terminate collections */
/* after this many milliseconds. Not a */