Issue #206 (bdwgc).
* Makefile.direct (SRCS): Add include/gc_alloc_ptrs.h.
* include/include.am (dist_noinst_HEADERS): Likewise.
* include/gc_alloc_ptrs.h: New file.
* include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr,
GC_uobjfreelist_ptr, GC_auobjfreelist_ptr, GC_incr_bytes_allocd,
GC_incr_bytes_freed): Move to the declarations to gc_alloc_ptrs.h.
* include/new_gc_alloc.h: Include gc_alloc_ptrs.h; update comment.
* mallocx.c: Likewise.
include/gc_inline.h include/gc_mark.h include/gc_disclaim.h \
tools/threadlibs.c tools/if_mach.c tools/if_not_there.c gc_cpp.cc \
include/gc_cpp.h include/weakpointer.h include/private/gc_locks.h \
- include/new_gc_alloc.h include/gc_allocator.h \
+ include/new_gc_alloc.h include/gc_alloc_ptrs.h include/gc_allocator.h \
include/javaxfc.h \
include/gc_backptr.h include/gc_gcj.h include/private/dbg_mlc.h \
include/private/specific.h include/leak_detector.h \
--- /dev/null
+/*
+ * Copyright (c) 1996-1998 by Silicon Graphics. All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose, provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
+/* This file should never be included by clients directly. */
+
+#ifndef GC_ALLOC_PTRS_H
+#define GC_ALLOC_PTRS_H
+
+#include "gc.h"
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+GC_API void ** const GC_objfreelist_ptr;
+GC_API void ** const GC_aobjfreelist_ptr;
+GC_API void ** const GC_uobjfreelist_ptr;
+
+#ifdef GC_ATOMIC_UNCOLLECTABLE
+ GC_API void ** const GC_auobjfreelist_ptr;
+#endif
+
+GC_API void GC_CALL GC_incr_bytes_allocd(size_t bytes);
+GC_API void GC_CALL GC_incr_bytes_freed(size_t bytes);
+
+#ifdef __cplusplus
+ } /* extern "C" */
+#endif
+
+#endif /* GC_ALLOC_PTRS_H */
include/cord.h \
include/cord_pos.h \
include/ec.h \
+ include/gc_alloc_ptrs.h \
include/new_gc_alloc.h \
include/private/darwin_semaphore.h \
include/private/darwin_stop_world.h \
#include <stddef.h>
#include <string.h>
-// The following need to match collector data structures.
// We can't include gc_priv.h, since that pulls in way too much stuff.
-// This should eventually be factored out into another include file.
-
-extern "C" {
- GC_API void ** const GC_objfreelist_ptr;
- GC_API void ** const GC_aobjfreelist_ptr;
- GC_API void ** const GC_uobjfreelist_ptr;
- GC_API void ** const GC_auobjfreelist_ptr;
-
- GC_API void GC_CALL GC_incr_bytes_allocd(size_t bytes);
- GC_API void GC_CALL GC_incr_bytes_freed(size_t bytes);
-}
+#include "gc_alloc_ptrs.h"
#define GC_generic_malloc_words_small(lw, k) \
GC_generic_malloc((lw) * sizeof(GC_word), k)
/* Some externally visible but unadvertised variables to allow access to */
/* free lists from inlined allocators without including gc_priv.h */
/* or introducing dependencies on internal data structure layouts. */
+#include "gc_alloc_ptrs.h"
void ** const GC_objfreelist_ptr = GC_objfreelist;
void ** const GC_aobjfreelist_ptr = GC_aobjfreelist;
void ** const GC_uobjfreelist_ptr = GC_uobjfreelist;