temporary hack for test_sballoc
authorRobert Haas <rhaas@postgresql.org>
Thu, 10 Apr 2014 19:53:52 +0000 (19:53 +0000)
committerRobert Haas <rhaas@postgresql.org>
Thu, 10 Apr 2014 19:53:52 +0000 (19:53 +0000)
contrib/test_sballoc/test_sballoc.c

index 8a64fd93052d5e223c870e325b49786c9f82475e..08620803dfc3760170a8ab62c7c664c1aab7f080 100644 (file)
@@ -16,6 +16,7 @@
 #include "fmgr.h"
 #include "utils/memutils.h"
 #include "utils/sb_alloc.h"
+#include "utils/sb_region.h"
 
 PG_MODULE_MAGIC;
 PG_FUNCTION_INFO_V1(alloc);
@@ -34,12 +35,17 @@ alloc(PG_FUNCTION_ARGS)
        sb_allocator *a;
 
        a = sb_create_private_allocator();
+       sb_dump_regions();
        for (i = 0; i < count; ++i)
        {
                p = sb_alloc(a, size, 0);
                *p = i;
        }
+       sb_dump_regions();
+#if 0
        sb_reset_allocator(a);
+       sb_dump_regions();
+#endif
 
        PG_RETURN_VOID();
 }