Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some TLSF inconsistencies #1061

Merged
merged 2 commits into from
Jan 19, 2020
Merged

Fix some TLSF inconsistencies #1061

merged 2 commits into from
Jan 19, 2020

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Jan 19, 2020

This fixes a few minor things in TLSF.

  • As jtenner pointed out, __realloc ignored GC state and required stdlib to deal with RCing, which feels wrong since it requires special care if a block's ref changes, so it now deals with that right away by keeping GC state of the original block. Only relevant for Array's ensureSize with everything else reallocating fresh blocks.
  • GC state was partly updated by the direct API methods like __realloc and partly by internals like reallocateBlock, which now is all internal.
  • We had asserts meant to execute on API usage only that were at strange places. Even though it did work, this is now separated and checked in a uniform way.

@dcodeIO dcodeIO merged commit 03bb15e into master Jan 19, 2020
@dcodeIO dcodeIO deleted the fix-tlsf-inconsistencies branch March 15, 2020 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant