Revision: 57305
http://sourceforge.net/p/brlcad/code/57305
Author: brlcad
Date: 2013-08-30 04:36:44 +0000 (Fri, 30 Aug 2013)
Log Message:
-----------
test is being a pig, only releasing a little bit of the memory allocated. test
needs to change so it actually compares heap against malloc.
Modified Paths:
--------------
brlcad/trunk/src/libbu/tests/bu_heap.c
Modified: brlcad/trunk/src/libbu/tests/bu_heap.c
===================================================================
--- brlcad/trunk/src/libbu/tests/bu_heap.c 2013-08-30 04:34:47 UTC (rev
57304)
+++ brlcad/trunk/src/libbu/tests/bu_heap.c 2013-08-30 04:36:44 UTC (rev
57305)
@@ -33,7 +33,7 @@
#include "bu.h"
/* this should match what is in heap.c */
-#define HEAP_BINS 1024
+#define HEAP_BINS 512
/*
@@ -65,24 +65,12 @@
#endif
allocalls++;
- if (i%3==0) {
- /* bu_log("freeing sz=%zd allocation\n", sz); */
#ifdef USE_MALLOC
- free(ptr);
+ free(ptr);
#else
- bu_heap_put(ptr, sz);
+ bu_heap_put(ptr, sz);
#endif
- freecalls++;
- }
- if (i % (1024 * 1024) == 0) {
-#ifdef USE_MALLOC
- free(NULL);
-#else
- bu_heap_put(NULL, 1);
-#endif
- freecalls++;
- }
-
+ freecalls++;
}
#ifdef USE_MALLOC
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits