var searchIndex = {}; searchIndex["allocators"] = {"doc":"Custom memory allocators and utilities for using them.","items":[[3,"Block","allocators","A block of memory created by an allocator.",null,null],[3,"HeapAllocator","","Allocator stub that just forwards to heap allocation.\nIt is recommended to use the `HEAP` constant instead\nof creating a new instance of this, to benefit from\nthe static lifetime that it provides.",null,null],[3,"Allocated","","An item allocated by a custom allocator.",null,null],[3,"Place","","A place for allocating into.\nThis is only used for in-place allocation,\ne.g. `let val = in (alloc.make_place().unwrap()) { EXPR }`",null,null],[4,"AllocatorError","","Errors that can occur while creating an allocator\nor allocating from it.",null,null],[13,"OutOfMemory","","The allocator failed to allocate the amount of memory requested of it.",0,null],[13,"UnsupportedAlignment","","The allocator does not support the requested alignment.",0,null],[13,"AllocatorSpecific","","An allocator-specific error message.",0,null],[0,"composable","","This module contains some composable building blocks to build allocator chains.",null,null],[3,"NullAllocator","allocators::composable","This allocator always fails.\nIt will panic if you try to deallocate with it.",null,null],[3,"Fallback","","This allocator has a main and a fallback allocator.\nIt will always attempt to allocate first with the main allocator,\nand second with the fallback.",null,null],[3,"Proxy","","This wraps an allocator and a writer, logging all allocations\nand deallocations.",null,null],[11,"allocate_raw","","",1,null],[11,"deallocate_raw","","",1,null],[11,"owns_block","","",1,null],[11,"new","","Create a new `Fallback`",2,{"inputs":[{"name":"m"},{"name":"f"}],"output":{"name":"self"}}],[11,"allocate_raw","","",2,null],[11,"deallocate_raw","","",2,null],[11,"owns_block","","",2,null],[11,"new","","Create a new proxy allocator.",3,{"inputs":[{"name":"a"},{"name":"w"}],"output":{"name":"self"}}],[11,"allocate_raw","","",3,null],[11,"deallocate_raw","","",3,null],[0,"freelist","allocators","A Free List allocator.",null,null],[3,"FreeList","allocators::freelist","A `FreeList` allocator manages a list of free memory blocks of uniform size.\nWhenever a block is requested, it returns the first free block.",null,null],[11,"new","","Creates a new `FreeList` backed by the heap. `block_size` must be greater\nthan or equal to the size of a pointer.",4,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"result"}}],[11,"new_from","","Creates a new `FreeList` backed by another allocator. `block_size` must be greater\nthan or equal to the size of a pointer.",4,{"inputs":[{"name":"a"},{"name":"usize"},{"name":"usize"}],"output":{"name":"result"}}],[11,"allocate_raw","","",4,null],[11,"deallocate_raw","","",4,null],[11,"drop","","",4,null],[0,"scoped","allocators","A scoped linear allocator. This is something of a cross between a stack allocator\nand a traditional linear allocator.",null,null],[3,"Scoped","allocators::scoped","A scoped linear allocator.",null,null],[11,"new","","Creates a new `Scoped` backed by `size` bytes from the heap.",5,{"inputs":[{"name":"usize"}],"output":{"name":"result"}}],[11,"new_from","","Creates a new `Scoped` backed by `size` bytes from the allocator supplied.",5,{"inputs":[{"name":"a"},{"name":"usize"}],"output":{"name":"result"}}],[11,"scope","","Calls the supplied function with a new scope of the allocator.",5,null],[11,"is_scoped","","",5,null],[11,"allocate_raw","","",5,null],[11,"deallocate_raw","","",5,null],[11,"owns_block","","",5,null],[11,"drop","","Drops the `Scoped`",5,null],[17,"HEAP","allocators","",null,null],[8,"Allocator","","A custom memory allocator.",null,null],[11,"allocate","","Attempts to allocate the value supplied to it.",6,null],[11,"make_place","","Attempts to create a place to allocate into.\nFor the general purpose, calling `allocate` on the allocator is enough.\nHowever, when you know the value you are allocating is too large\nto be constructed on the stack, you should use in-place allocation.",6,null],[10,"allocate_raw","","Attempt to allocate a block of memory.",6,null],[10,"deallocate_raw","","Deallocate the memory referred to by this pointer.",6,null],[8,"BlockOwner","","An allocator that knows which blocks have been issued by it.",null,null],[11,"owns","","Whether this allocator owns this allocated value.",7,null],[10,"owns_block","","Whether this allocator owns the block passed to it.",7,null],[11,"with_fallback","","Joins this allocator with a fallback allocator.",7,null],[11,"new","","Create a new block from the supplied parts.",8,null],[11,"empty","","Creates an empty block.",8,{"inputs":[],"output":{"name":"self"}}],[11,"ptr","","Get the pointer from this block.",8,null],[11,"size","","Get the size of this block.",8,null],[11,"align","","Get the align of this block.",8,null],[11,"is_empty","","Whether this block is empty.",8,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"fmt","","",0,null],[11,"fmt","","",0,null],[11,"description","","",0,null],[11,"fmt","","",9,null],[11,"allocate_raw","","",9,null],[11,"deallocate_raw","","",9,null],[11,"deref","","",10,null],[11,"deref_mut","","",10,null],[11,"downcast","","Attempts to downcast this `Allocated` to a concrete type.",10,null],[11,"borrow","","",10,null],[11,"borrow_mut","","",10,null],[11,"drop","","",10,null],[11,"make_place","","",11,null],[11,"finalize","","",11,null],[11,"pointer","","",11,null],[11,"drop","","",11,null]],"paths":[[4,"AllocatorError"],[3,"NullAllocator"],[3,"Fallback"],[3,"Proxy"],[3,"FreeList"],[3,"Scoped"],[8,"Allocator"],[8,"BlockOwner"],[3,"Block"],[3,"HeapAllocator"],[3,"Allocated"],[3,"Place"]]}; initSearch(searchIndex);