Crate jenga [−] [src]
Jenga: A stack based allocator.
General principles:
There are two ways of making allocations:
a) by calling one of the place or place_iter methods, which then allow access to the data in the provided closure. b) by calling frame which allows access to the thread_local Frame, from which futher allocations can be made. This method might be slightly faster as no additional checks are nessesary.
Memory Pool
As a default size, 1MB of memory will be allocated whenever the allocator is used first. This can be changed by calling init_with_capacity first.
Structs
Cursor |
'a: lifetime of the frame 'b: the borrow of &mut Frame |
FArray |
An array that owns the data. |
FBox | |
Frame |
An allocation Frame. |
InitError | |
OutOfMemory | |
Writer |
'a: lifetime of the frame 'b: the borrow of &mut Frame |