Skip to content

Commit 509f7bc

Browse files
committed
Remove Chunk Allocator.
1 parent 395dcb5 commit 509f7bc

9 files changed

Lines changed: 26 additions & 482 deletions

File tree

src/backend/backend.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#pragma once
22
#include "../mem/allocconfig.h"
33
#include "../pal/pal.h"
4-
#include "chunkallocator.h"
54
#include "commitrange.h"
65
#include "commonconfig.h"
76
#include "decayrange.h"
@@ -305,9 +304,9 @@ namespace snmalloc
305304
}
306305

307306
static void dealloc_chunk(
308-
LocalState& local_state, ChunkRecord* chunk_record, size_t size)
307+
LocalState& local_state, MetaCommon& meta_common, size_t size)
309308
{
310-
auto chunk = chunk_record->meta_common.chunk;
309+
auto chunk = meta_common.chunk;
311310

312311
/*
313312
* The backend takes possession of these chunks now, by disassociating
@@ -319,7 +318,7 @@ namespace snmalloc
319318
Pagemap::set_metaentry(address_cast(chunk), size, t);
320319

321320
local_state.get_meta_range()->dealloc_range(
322-
capptr::Chunk<void>(chunk_record), PAGEMAP_METADATA_STRUCT_SIZE);
321+
capptr::Chunk<void>(&meta_common), PAGEMAP_METADATA_STRUCT_SIZE);
323322

324323
local_state.object_range->dealloc_range(chunk, size);
325324
}

src/backend/chunkallocator.h

Lines changed: 0 additions & 370 deletions
This file was deleted.

0 commit comments

Comments
 (0)