File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
test/func/thread_alloc_external Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,12 @@ namespace snmalloc
6060 */
6161 ~ScopedAllocator ()
6262 {
63- alloc->flush ();
64- AllocPool<typename SAlloc::Config>::release (alloc);
65- alloc = nullptr ;
63+ if (alloc != nullptr )
64+ {
65+ alloc->flush ();
66+ AllocPool<typename SAlloc::Config>::release (alloc);
67+ alloc = nullptr ;
68+ }
6669 }
6770
6871 /* *
Original file line number Diff line number Diff line change @@ -1335,11 +1335,10 @@ namespace snmalloc
13351335 continue ;
13361336
13371337 // All elements should have the same entry.
1338- const auto & entry =
1339- Config::Backend::get_metaentry (small_fast_free_lists[i].peek ());
1338+ const auto & entry = Config::Backend::get_metaentry (
1339+ address_cast (small_fast_free_lists[i].peek () ));
13401340 do
13411341 {
1342- // return each element
13431342 auto p = small_fast_free_lists[i].take (key, domesticate);
13441343 SNMALLOC_ASSERT (is_start_of_object (
13451344 sizeclass_t::from_small_class (i), address_cast (p)));
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ int main()
7171 snmalloc::dealloc (r1);
7272 }
7373
74- snmalloc::debug_teardown ();
74+ // snmalloc::debug_teardown();
7575
7676 // This checks that the scoped allocator does not call
7777 // register clean up, as this configuration will fault
You can’t perform that action at this time.
0 commit comments