Move BACKEND_MARKER to backend/metatypes
And rename it to REMOTE_BACKEND_MARKER to scope it a bit.
This commit is contained in:
committed by
Nathaniel Wesley Filardo
parent
9d97a38806
commit
b5a66131bd
@@ -29,7 +29,8 @@ namespace snmalloc
|
||||
{
|
||||
SNMALLOC_ASSERT((r & (MIN_CHUNK_SIZE - 1)) == 0);
|
||||
// Preserve lower bits.
|
||||
*ptr = r | address_cast(*ptr & (MIN_CHUNK_SIZE - 1)) | BACKEND_MARKER;
|
||||
*ptr = r | address_cast(*ptr & (MIN_CHUNK_SIZE - 1)) |
|
||||
MetaEntry::REMOTE_BACKEND_MARKER;
|
||||
}
|
||||
|
||||
static Contents get(const Holder* ptr)
|
||||
|
||||
@@ -123,6 +123,17 @@ namespace snmalloc
|
||||
uintptr_t remote_and_sizeclass{0};
|
||||
|
||||
public:
|
||||
/**
|
||||
* This bit is set in remote_and_sizeclass to discriminate between the case
|
||||
* that it is in use by the frontend (0) or by the backend (1). For the
|
||||
* former case, see mem/metaslab.h; for the latter, see backend/backend.h
|
||||
* and backend/largebuddyrange.h.
|
||||
*
|
||||
* This value is statically checked by the frontend to ensure that its
|
||||
* bit packing does not conflict; see mem/remoteallocator.h
|
||||
*/
|
||||
static constexpr address_t REMOTE_BACKEND_MARKER = 1 << 7;
|
||||
|
||||
constexpr MetaEntry() = default;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user