summaryrefslogtreecommitdiff
path: root/examples/Shared_Malloc
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-04-13 18:45:35 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-04-13 18:45:35 +0000
commit9c3e69dd2d071eb1b41f64033e4b4fd9123705b0 (patch)
tree0e241efb62d86e928668521585eddb7a75d27feb /examples/Shared_Malloc
parent3d0eb6cf3b9f06578a515a1a9b5f8fecb6f3da34 (diff)
downloadATCD-9c3e69dd2d071eb1b41f64033e4b4fd9123705b0.tar.gz
*** empty log message ***
Diffstat (limited to 'examples/Shared_Malloc')
-rw-r--r--examples/Shared_Malloc/test_malloc.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/Shared_Malloc/test_malloc.cpp b/examples/Shared_Malloc/test_malloc.cpp
index 57e8899d68a..41646d0105b 100644
--- a/examples/Shared_Malloc/test_malloc.cpp
+++ b/examples/Shared_Malloc/test_malloc.cpp
@@ -29,7 +29,12 @@ malloc_recurse (int count)
{
static char default_char = 0;
- if (count > 0)
+ if (count <= 0)
+ {
+ if (Options::instance ()->debug ())
+ AMS (Malloc::instance ()->print_stats ());
+ }
+ else
{
int alloc_size = gen_size ();
void *ptr = Malloc::instance ()->malloc (alloc_size);