+extern (C) void* gc_malloc(size_t sz, uint attrs = 0,
+ PointerMap ptrmap = PointerMap.init)
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ return malloc(sz, attrs, ptrmap);
+}
+
+extern (C) void* gc_calloc(size_t sz, uint attrs = 0,
+ PointerMap ptrmap = PointerMap.init)
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ return calloc(sz, attrs, ptrmap);
+}
+
+extern (C) void* gc_realloc(void* p, size_t sz, uint attrs = 0,
+ PointerMap ptrmap = PointerMap.init)
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ return realloc(p, sz, attrs, ptrmap);
+}
+
+extern (C) size_t gc_extend( void* p, size_t mx, size_t sz )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ return extend(p, mx, sz);
+}
+
+extern (C) size_t gc_reserve( size_t sz )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ return reserve(sz);
+}
+
+extern (C) void gc_free( void* p )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ free(p);
+}
+
+extern (C) void* gc_addrOf( void* p )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ return addrOf(p);
+}
+
+extern (C) size_t gc_sizeOf( void* p )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ return sizeOf(p);
+}
+
+extern (C) BlkInfo gc_query( void* p )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ return query(p);
+}
+
+// NOTE: This routine is experimental. The stats or function name may change
+// before it is made officially available.
+extern (C) GCStats gc_stats()
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ GCStats stats = void;
+ getStats(stats);
+ return stats;
+}
+
+extern (C) void gc_addRoot( void* p )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ addRoot(p);
+}
+
+extern (C) void gc_addRange( void* p, size_t sz )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ addRange(p, sz);
+}
+
+extern (C) void gc_removeRoot( void *p )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ removeRoot(p);
+}
+
+extern (C) void gc_removeRange( void *p )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ removeRange(p);
+}
+
+extern (C) void* gc_weakpointerCreate( Object r )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ return weakpointerCreate(r);
+}
+
+extern (C) void gc_weakpointerDestroy( void* wp )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ weakpointerDestroy(wp);
+}
+
+extern (C) Object gc_weakpointerGet( void* wp )
+{
+ assert (Invariant()); scope (exit) assert (Invariant());
+ return weakpointerGet(wp);