]> granicus.if.org Git - gc/commitdiff
Recognize GC_GET_HEAP_USAGE_NOT_NEEDED option
authorIvan Maidanski <ivmai@mail.ru>
Tue, 6 Nov 2012 15:08:40 +0000 (19:08 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 6 Nov 2012 15:08:40 +0000 (19:08 +0400)
* misc.c (GC_get_heap_usage_safe): Do not define if
GC_GET_HEAP_USAGE_NOT_NEEDED (for smaller code size if requested).

misc.c

diff --git a/misc.c b/misc.c
index 196ec7e799785c85485dc4a0f85372f6ad89c117..ccbe6185719bdfdd01c3fc7b245c4cf68efd6f20 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -484,6 +484,8 @@ GC_API size_t GC_CALL GC_get_total_bytes(void)
     return (size_t)(GC_bytes_allocd + GC_bytes_allocd_before_gc);
 }
 
+#ifndef GC_GET_HEAP_USAGE_NOT_NEEDED
+
 /* Return the heap usage information.  This is a thread-safe (atomic)   */
 /* alternative for the five above getters.  NULL pointer is allowed for */
 /* any argument.  Returned (filled in) values are of word type.         */
@@ -507,6 +509,8 @@ GC_API void GC_CALL GC_get_heap_usage_safe(GC_word *pheap_size,
   UNLOCK();
 }
 
+#endif /* !GC_GET_HEAP_USAGE_NOT_NEEDED */
+
 #if defined(GC_DARWIN_THREADS) || defined(GC_OPENBSD_THREADS) \
     || defined(GC_WIN32_THREADS) || (defined(NACL) && defined(THREADS))
   /* GC does not use signals to suspend and restart threads.    */