Memory Usage test: touch allocated memory before asking about usage
authorPhil Miller <mille121@illinois.edu>
Fri, 23 Nov 2012 16:57:51 +0000 (10:57 -0600)
committerPhil Miller <mille121@illinois.edu>
Fri, 23 Nov 2012 16:57:51 +0000 (10:57 -0600)
tests/util/check.C

index aad0aba1ce2392f19910d442113e55544c26fe56..559e15fc00bf808fa996b88887ee68a0db0cd2ee 100644 (file)
@@ -63,8 +63,10 @@ void check_test(int argc, char** argv) {
 #if ! CMK_SMP
   const int s = 8*1024*1024;
   void *buf1 = CmiAlloc(s);
+  memset(buf1, 1, s);
   CmiUInt8 mem_before = CmiMemoryUsage();
   void *buf2 = CmiAlloc(s);
+  memset(buf2, 2, s);
   CmiUInt8 mem_after = CmiMemoryUsage();
   CmiFree(buf2);
   CmiFree(buf1);