@@ -1111,20 +1111,6 @@ namespace snmalloc
1111
1111
{
1112
1112
super_available.remove (super);
1113
1113
1114
- if constexpr (decommit_strategy == DecommitSuper)
1115
- {
1116
- large_allocator.memory_provider .notify_not_using (
1117
- pointer_offset (super, OS_PAGE_SIZE),
1118
- SUPERSLAB_SIZE - OS_PAGE_SIZE);
1119
- }
1120
- else if constexpr (decommit_strategy == DecommitSuperLazy)
1121
- {
1122
- static_assert (
1123
- pal_supports<LowMemoryNotification, MemoryProvider>,
1124
- " A lazy decommit strategy cannot be implemented on platforms "
1125
- " without low memory notifications" );
1126
- }
1127
-
1128
1114
chunkmap ().clear_slab (super);
1129
1115
large_allocator.dealloc (super, 0 );
1130
1116
stats ().superslab_push ();
@@ -1208,12 +1194,6 @@ namespace snmalloc
1208
1194
sc->remove (slab);
1209
1195
}
1210
1196
1211
- if constexpr (decommit_strategy == DecommitSuper)
1212
- {
1213
- large_allocator.memory_provider .notify_not_using (
1214
- pointer_offset (slab, OS_PAGE_SIZE), SUPERSLAB_SIZE - OS_PAGE_SIZE);
1215
- }
1216
-
1217
1197
chunkmap ().clear_slab (slab);
1218
1198
large_allocator.dealloc (slab, 0 );
1219
1199
stats ().superslab_push ();
@@ -1261,19 +1241,13 @@ namespace snmalloc
1261
1241
MEASURE_TIME (large_dealloc, 4 , 16 );
1262
1242
1263
1243
size_t size_bits = bits::next_pow2_bits (size);
1264
- size_t rsize = bits::one_at_bit (size_bits);
1265
- assert (rsize >= SUPERSLAB_SIZE);
1244
+ assert (bits::one_at_bit (size_bits) >= SUPERSLAB_SIZE);
1266
1245
size_t large_class = size_bits - SUPERSLAB_BITS;
1267
1246
1268
1247
chunkmap ().clear_large_size (p, size);
1269
1248
1270
1249
stats ().large_dealloc (large_class);
1271
1250
1272
- // Cross-reference largealloc's alloc() decommitted condition.
1273
- if ((decommit_strategy != DecommitNone) || (large_class > 0 ))
1274
- large_allocator.memory_provider .notify_not_using (
1275
- pointer_offset (p, OS_PAGE_SIZE), rsize - OS_PAGE_SIZE);
1276
-
1277
1251
// Initialise in order to set the correct SlabKind.
1278
1252
Largeslab* slab = static_cast <Largeslab*>(p);
1279
1253
slab->init ();
0 commit comments