-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Labels
A-allocatorArea: AllocatorArea: AllocatorA-spaceArea: Space/PageResourceArea: Space/PageResourceC-enhancementCategory: EnhancementCategory: EnhancementP-normalPriority: Normal.Priority: Normal.
Description
Allocation semantics are a set of properties that an object may have. This is a replacement of the current enum Allocator
(which also helps avoid confusion of the name Allocator). Allocation semantics are like UNIX file attributes. You can or
those flags/semantics.
Each space defines the semantics for objects in it. For example, all objects in an immortal space are non-moving. Pinned objects in certain spaces are non-moving.
A plan defines how to map allocation semantics to the actual allocators (which further map to spaces). The plan implementer needs to provide a complete mapping for all the combinations of allocation semantics (though he may use fallback, or simply fail on certain allocation semantics).
Two APIs are related with this:
alloc(..., semantics) -> object
: uses the mapping defined by the plan to allocate objecthas_semantic(object, semantics) -> bool
: uses the semantics defined by the space to determine if the object has those semantics.
Metadata
Metadata
Assignees
Labels
A-allocatorArea: AllocatorArea: AllocatorA-spaceArea: Space/PageResourceArea: Space/PageResourceC-enhancementCategory: EnhancementCategory: EnhancementP-normalPriority: Normal.Priority: Normal.