allocate 1MB so that CmiMemoryUsage show something different (for Mac using sbrk)
authorGengbin Zheng <gzheng@illinois.edu>
Wed, 17 Feb 2010 22:33:59 +0000 (16:33 -0600)
committerGitosis server account <gitosis@charm.cs.uiuc.edu>
Wed, 17 Feb 2010 22:33:59 +0000 (16:33 -0600)
via git-CVS emulator

tests/util/check.C

index 8d0257a8932c4dbaab26806605a3d4d4c74dec56..4a1aab4f34c07499098e4bf574f2706e5bca08bc 100644 (file)
@@ -50,11 +50,11 @@ void check_test(int argc, char** argv) {
   }
 
   CmiUInt8 mem_before = CmiMemoryUsage();
-  void *buf = CmiAlloc(1024);
+  void *buf = CmiAlloc(1024*1024);
   CmiUInt8 mem_after = CmiMemoryUsage();
   CmiFree(buf);
   if (mem_after - mem_before < 1024) {
-    CmiPrintf("Error: CmiMemoryUsage() does not work!\n");
+    CmiPrintf("Error: CmiMemoryUsage() does not work %lld vs %lld!\n", mem_before, mem_after);
     exit(1);
   }