Struct catalyst_entities::CodeAllocator
source · pub struct CodeAllocator { /* private fields */ }Expand description
Used for allocating executable memory, serializing compiled code and synchronizing code relocations.
Implementations§
source§impl CodeAllocator
impl CodeAllocator
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new CodeAllocator. No memory is allocated until the first
call to alloc.
sourcepub fn data<'a>(&'a self, code: &Code, finishing: bool) -> CodeGuard<'a>
pub fn data<'a>(&'a self, code: &Code, finishing: bool) -> CodeGuard<'a>
Gives access to Allocated code. More in CodeGuard docs. This function uses spin lock. If
you are holding mutable guard, try to hold it for as short as possible. When finishing is
true the code will be frozen after guard is dropped.
Trait Implementations§
source§impl Archive for CodeAllocator
impl Archive for CodeAllocator
source§impl Default for CodeAllocator
impl Default for CodeAllocator
source§impl<S: Serializer + ScratchSpace> Serialize<S> for CodeAllocator
impl<S: Serializer + ScratchSpace> Serialize<S> for CodeAllocator
impl Send for CodeAllocator
impl Sync for CodeAllocator
Auto Trait Implementations§
impl !ArchiveCopy for CodeAllocator
impl NoInteriorMutability for CodeAllocator
impl RefUnwindSafe for CodeAllocator
impl Unpin for CodeAllocator
impl UnwindSafe for CodeAllocator
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere T: Archive,
§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
The archived counterpart of this type. Unlike
Archive, it may be unsized. Read more§type MetadataResolver = ()
type MetadataResolver = ()
The resolver for the metadata of this type. Read more
source§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata )
Creates the archived version of the metadata for this value at the given position and writes
it to the given output. Read more