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

[backport] thrust/mr: fix the case of reuising a block for a smaller alloc. (#1232) #1317

Merged

Commits on Jan 24, 2024

  1. thrust/mr: fix the case of reuising a block for a smaller alloc. (NVI…

    …DIA#1232)
    
    * thrust/mr: fix the case of reuising a block for a smaller alloc.
    
    Previously, the pool happily returned a pointer to a larger oversized
    block than requested, without storing the information that the block is
    now smaller, which meant that on deallocation, it'd look for the
    descriptor of the block in the wrong place. This is now fixed by moving
    the descriptor to always be where deallocation can find it using the
    user-provided size, and by storing the original size to restore the
    descriptor to its rightful place when deallocating.
    
    Also a drive-by fix for a bug where in certain cases the reallocated
    cached oversized block wasn't removed from the cached list. Whoops.
    Kinda surprised this hasn't exploded before.
    
    * thrust/mr: add aliases to reused pointer traits in pool.h
    griwes committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    7622c4b View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. Configuration menu
    Copy the full SHA
    782163d View commit details
    Browse the repository at this point in the history