Skip to content

Commit b68dd9b

Browse files
committed
Remove ChunkAllocator
1 parent 55049f5 commit b68dd9b

8 files changed

Lines changed: 19 additions & 475 deletions

File tree

src/backend/backend.h

Lines changed: 4 additions & 5 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 "empty_range.h"
@@ -301,10 +300,10 @@ namespace snmalloc
301300
return {p, meta};
302301
}
303302

304-
static void dealloc_chunk(
305-
LocalState& local_state, ChunkRecord* chunk_record, size_t size)
303+
static void
304+
dealloc_chunk(LocalState& local_state, MetaCommon& meta_common, size_t size)
306305
{
307-
auto chunk = chunk_record->meta_common.chunk;
306+
auto chunk = meta_common.chunk;
308307

309308
/*
310309
* The backend takes possession of these chunks now, by disassociating
@@ -316,7 +315,7 @@ namespace snmalloc
316315
Pagemap::set_metaentry(address_cast(chunk), size, t);
317316

318317
local_state.get_meta_range()->dealloc_range(
319-
capptr::Chunk<void>(chunk_record), PAGEMAP_METADATA_STRUCT_SIZE);
318+
capptr::Chunk<void>(&meta_common), PAGEMAP_METADATA_STRUCT_SIZE);
320319

321320
local_state.object_range->dealloc_range(chunk, size);
322321
}

0 commit comments

Comments
 (0)