Fix mstats scope
timbo [Fri, 28 Sep 2012 18:57:04 +0000 (13:57 -0500)]
Memory.xs

index d444c7f..3420f29 100644 (file)
--- a/Memory.xs
+++ b/Memory.xs
@@ -1513,14 +1513,13 @@ CODE:
   st->min_recurse_threshold = NO_RECURSION; /* so always recurse */
 
   perl_size(aTHX_ st, NPathLink("perl_interp"));
-
+# ifdef HAS_MSTATS
   NPathSetNode("free_malloc_space", NPtype_NAME);
   ADD_SIZE(st, "bytes_free", ms.bytes_free);
   ADD_ATTR(st, NPattr_NOTE, "bytes_total", ms.bytes_total);
   ADD_ATTR(st, NPattr_NOTE, "bytes_used",  ms.bytes_used);
   ADD_ATTR(st, NPattr_NOTE, "chunks_used", ms.chunks_used);
   ADD_ATTR(st, NPattr_NOTE, "chunks_free", ms.chunks_free);
-# ifdef HAS_MSTATS
   /* TODO get heap size from OS and add a node: unknown = heapsize - perl - ms.bytes_free */
   /* for now we use bytes_total as an approximation */
   NPathSetNode("unknown", NPtype_NAME);