Conversation
|
Thanks you for adding a description to the PR.
It would be good to have an example use case here, where the existing impls would not be a good fit but this simplest impl would be better fit.
That seems like footgun and unsound behaviour to me. The example use case description should also document why this is worth having. |
This is keeping in mind that the API remains almost identical to the user, they only have to pick one of the impls. |
|
|
||
| [features] | ||
| default = ["llff", "tlsf"] | ||
| default = ["llff", "tlsf", "simplest"] |
There was a problem hiding this comment.
Assuming we go forward with this new feature, IMO it should not be the default.
@zeenix You are right, this implementation is unsound, so I'm not sure if it's good to merge it into this crate. Maybe I can keep it private. |
That's what I was wondering. If
Sure. |
A simplest heap is very useful on a resource-constrained platform and avoids the need to use
heaplessmodules. Its usage is the same as other heaps.Because it's the simplest implementation, it doesn't free memory. Any memory you drop cannot be reused (it's leaked), so avoid dropping anything whenever possible.