* bump-allocator: refine comments
* Rename EMPTY_MARKER to Nil
It's a misnomer since it doesn't actually denote an empty list as it might suggest but rather the end of a list. So I borrowed Nil from Cons/Nil.I could've gone with Null, especially considering that the variant name is already named `Null`, but I preferred `Nil` because the NIL_MARKER is not 0 as `null` may suggest, but rather 0xFFFFFFFF.
* Rename N to N_ORDERS; docs;
Supply a, hopefully, more readable comment as well.
* allocator poisoning: document and enforce.
* Review: Fix line wrapping for a call
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* add a test on oom
* Update primitives/allocator/src/freeing_bump.rs
* Make ui tests happy
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Revert stuff that shouldn't have been committed
* Revert stuff that shouldn't have been committed
* Fix parent relative link generation
* Manually remove this incorrect link for now.
* Bump version
* update test-utils crates to be ready for publishing
* adding changelog
* Adding automaticly generated READMEs
* fixing versions
* another version mishap
* Version bump
* Split generate_changelog.sh into separate script
Can be run in the format `generate_changelog.sh $previous_version $version`.
* remove early exit from publish_draft_release.sh
* adding changelog
* ci: change last_github_release to also find pre-releases
Co-authored-by: Martin Pugh <pugh@s3kr.it>
* setting first batch of descriptions
* fix what I just broke
* next batch
* and pallets, too
* last batch
* set cargo.lock
* keep'em dev-deps
* bump version to alpha.2
* setting versions to development pre-release
fixing version in dependencies
* unset already released wasm-builder
* do not publish test crates
* adding licenses
* setting homepage metadata
* set repository url
* Clarify code a bit.
* Move code around.
* Introduce `Order`.
* Introduce `Link` structure.
* Get rid of ptr_offset
This is beneficial since ptr_offset is essentially makes us handle two different address spaces, global (i.e. `mem`) and heap local and without it things are becoming simpler.
* Rename PREFIX_SIZE to HEADER_SIZE.
This will come in the next commits.
* Introduce a separate `Memory` trait.
This is not necessary, but will come in handy for the upcoming changes.
* Rename `ptr` to `header_ptr` where makes sense.
* Introduce a `Header` type.
* Make `bump` dumber.
This allows us to pull `HEADER_SIZE` to see that we actually allocate `order.size() + HEADER_SIZE`.
* Clean up.
* Introduce a freelists struct.
* Update documentation.
* Make Sized requirement optional to make the PR truly back-compatible.
* Apply suggestions from code review
Co-Authored-By: Gavin Wood <gavin@parity.io>
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Gavin Wood <github@gavwood.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* 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
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`.