X-Git-Url: http://plrg.eecs.uci.edu/git/?p=junction.git;a=blobdiff_plain;f=samples%2FMallocTest%2FMallocTest.cpp;h=3aba8f0c7058fc3d5074ad68fde17ac584a71fa6;hp=c0e18cf71091e50b00b22028ec82f648200285b1;hb=85f6b6e7f0c65f292e21af4b0fa2ef6ad2955a00;hpb=36b33f71c9b2568f3bfe1127741a1187b0ab342a;ds=sidebyside diff --git a/samples/MallocTest/MallocTest.cpp b/samples/MallocTest/MallocTest.cpp index c0e18cf..3aba8f0 100644 --- a/samples/MallocTest/MallocTest.cpp +++ b/samples/MallocTest/MallocTest.cpp @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------ Junction: Concurrent data structures in C++ - Copyright (c) 2016 Jeff Preshing + Copyright (c) 2016-2017 Jeff Preshing Distributed under the Simplified BSD License. Original location: https://github.com/preshing/junction @@ -22,6 +22,8 @@ int main() { junction::extra::MapAdapter::ThreadContext context(adapter, 0); junction::extra::MapAdapter::Map map(65536); + context.registerThread(); + ureg population = 0; for (ureg i = 0; i < 100; i++) { #if TURF_USE_DLMALLOC && TURF_DLMALLOC_FAST_STATS @@ -31,5 +33,8 @@ int main() { map.assign(population + 1, (void*) ((population << 2) | 3)); } + context.update(); + context.unregisterThread(); + return 0; }