diff --git a/src/backend/backend.h b/src/backend/backend.h index 703d0d2..cd25e86 100644 --- a/src/backend/backend.h +++ b/src/backend/backend.h @@ -305,11 +305,18 @@ namespace snmalloc { auto chunk = chunk_record->meta_common.chunk; + /* + * The backend takes possession of these chunks now, by disassociating + * any existing remote allocator and metadata structure. If + * interrogated, the sizeclass reported by the MetaEntry is 0, which has + * size 0. + */ + MetaEntry t(nullptr, MetaEntry::REMOTE_BACKEND_MARKER); + Pagemap::set_metaentry(address_cast(chunk), size, t); + local_state.get_meta_range()->dealloc_range( capptr::Chunk(chunk_record), PAGEMAP_METADATA_STRUCT_SIZE); - // TODO, should we set the sizeclass to something specific here? - local_state.object_range->dealloc_range(chunk, size); }