Commit 46a911b 1 parent c005ba1 commit 46a911b Copy full SHA for 46a911b
File tree 3 files changed +9
-7
lines changed
test/func/thread_alloc_external
3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,12 @@ namespace snmalloc
60
60
*/
61
61
~ScopedAllocator ()
62
62
{
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
+ }
66
69
}
67
70
68
71
/* *
Original file line number Diff line number Diff line change @@ -1335,11 +1335,10 @@ namespace snmalloc
1335
1335
continue ;
1336
1336
1337
1337
// 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 () ));
1340
1340
do
1341
1341
{
1342
- // return each element
1343
1342
auto p = small_fast_free_lists[i].take (key, domesticate);
1344
1343
SNMALLOC_ASSERT (is_start_of_object (
1345
1344
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()
71
71
snmalloc::dealloc (r1);
72
72
}
73
73
74
- snmalloc::debug_teardown ();
74
+ // snmalloc::debug_teardown();
75
75
76
76
// This checks that the scoped allocator does not call
77
77
// register clean up, as this configuration will fault
You can’t perform that action at this time.
0 commit comments