Commit Graph

2 Commits

Author SHA1 Message Date
Bastian Köcher 07daa525b9 Allocator improvements/clean ups (#4838)
* FreeingBumpAllocator: Initialize the heads to `u32::max_value()`

`self.heads` can point to an element with the index `0` in the heap.
This would make the allocator fail to reuse this element.

* Simplify the `PREFIX_SIZE` handling
2020-02-06 16:08:11 +01:00
Bastian Köcher 5bd6e94e64 Move "wasm" allocator into its own crate (#4716)
This moves the wasm-allocator (`FreeingBumpHeapAllocator`) into its own
crate `sp-allocator`. This new crate can theoretically provide multiple
different allocators. Besides moving the allocator, this pr also makes
`FreeingBumpHeapAllocator` compile on `no_std`.
2020-01-22 18:13:17 +01:00