[−][src]Struct context_coroutine::CoroutineMemorySource
This design does not use a guard page (via mprotect(PROT_NONE)
) to separate the heap and stack.
Guard pages need to be at least 1Mb to be effective (see discussion in https://www.openwall.com/lists/oss-security/2017/06/19/1), which is probably too large for coroutines if using a design that ensures all virtual memory is physically backed.
Methods
impl<GTACSA: GlobalThreadAndCoroutineSwitchableAllocator, CoroutineLocalAllocatorConstructor: Fn(RcMemorySource<ArenaMemorySource<MemoryMapSource>>, NonZeroUsize) -> Result<GTACSA::CoroutineLocalAllocator, AllocErr>> CoroutineMemorySource<GTACSA, CoroutineLocalAllocatorConstructor>
[src]
pub fn new(
global_allocator: &'static GTACSA,
coroutine_local_allocator_constructor: CoroutineLocalAllocatorConstructor,
memory_map_source: MemoryMapSource,
memory_source_size: NonZeroUsize,
heap_size: NonZeroUsize,
stack_size: NonZeroUsize
) -> Result<Self, AllocErr>
[src]
global_allocator: &'static GTACSA,
coroutine_local_allocator_constructor: CoroutineLocalAllocatorConstructor,
memory_map_source: MemoryMapSource,
memory_source_size: NonZeroUsize,
heap_size: NonZeroUsize,
stack_size: NonZeroUsize
) -> Result<Self, AllocErr>
Creates a new instance.
Trait Implementations
impl<GTACSA: Debug + 'static + GlobalThreadAndCoroutineSwitchableAllocator, CoroutineLocalAllocatorConstructor: Debug + Fn(RcMemorySource<ArenaMemorySource<MemoryMapSource>>, NonZeroUsize) -> Result<GTACSA::CoroutineLocalAllocator, AllocErr>> Debug for CoroutineMemorySource<GTACSA, CoroutineLocalAllocatorConstructor>
[src]
Auto Trait Implementations
impl<GTACSA, CoroutineLocalAllocatorConstructor> !Send for CoroutineMemorySource<GTACSA, CoroutineLocalAllocatorConstructor>
impl<GTACSA, CoroutineLocalAllocatorConstructor> !Sync for CoroutineMemorySource<GTACSA, CoroutineLocalAllocatorConstructor>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,