diff options
Diffstat (limited to 'src/mem/alloc.rs')
-rw-r--r-- | src/mem/alloc.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mem/alloc.rs b/src/mem/alloc.rs index 4d02ddd..fcd33c2 100644 --- a/src/mem/alloc.rs +++ b/src/mem/alloc.rs @@ -478,3 +478,10 @@ unsafe impl GlobalAlloc for GrandAllocator { /// The allocator of allocators. It hands out fixed sized memory chunks. #[global_allocator] pub static ALLOCATOR: GrandAllocator = GrandAllocator{}; + +/// # Global Allocator +/// +/// Returns a borrow for the Global Allocator +pub fn alloc() -> &'static crate::mem::alloc::GrandAllocator { + &crate::mem::alloc::ALLOCATOR +} |