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

bli_pool: add sanity check in bli_pool_free_block() #565

Closed
wants to merge 1 commit into from

Conversation

hominhquan
Copy link
Contributor

Details:

  • In case of pool reinit due to a thread asking for a bigger block, the
    pool is re-initialized and all blocks are free-ed, including potential
    ones already checked out and being used elsewhere. Those empty slots
    are marked with NULL pointer and hence we should skip calling free()
    on them (with subtraction by offset_size).
  • The orphaned blocks and their pointers will be free-ed later when
    checking in back by the existing check-in mechanism.

Details:
- In case of pool reinit due to a thread asking for a bigger block, the
  pool is re-initialized and all blocks are free-ed, including potential
  ones already checked out and being used elsewhere. Those empty slots
  are marked with NULL pointer and hence we should skip calling free()
  on them (with subtraction by offset_size).
- The orphaned blocks and their pointers will be free-ed later when
  checking in back by the existing check-in mechanism.
@devinamatthews
Copy link
Member

@hominhquan I believe the problems leading to this PR were fixed recently in #670 and #671. If not, let me know.

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.

2 participants