Skip to content

alloc: fix reallocate_inplace implementation #17705

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 3, 2014
Merged

alloc: fix reallocate_inplace implementation #17705

merged 1 commit into from
Oct 3, 2014

Conversation

thestinger
Copy link
Contributor

The returned size is the new real size of the allocation.

@alexcrichton
Copy link
Member

Can this be tested? I don't think there are currently any users of this, and it'd be nice to have at least a smoke test.

@thestinger
Copy link
Contributor Author

The can't really be tested without hard-wiring an assumption about when jemalloc can do an in-place resize.

@alexcrichton
Copy link
Member

Oh ok, one other question I just realized, if the returned size is the new size, this looks like it will return false if reallocate_inplace was called with a smaller size than before? (when it may actually succeed).

Could that be deterministically tested as well?

The returned size is the new real size of the allocation.
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Oct 2, 2014
@bors bors merged commit 8d7274b into rust-lang:master Oct 3, 2014
@thestinger thestinger deleted the realloc branch October 3, 2014 07:31
lnicola pushed a commit to lnicola/rust that referenced this pull request Aug 13, 2024
feat: Use oldest rustup rust-analyzer when toolchain override is present

Selects a rust-toolchain declared RA based on its date. The earliest (oldest) RA wins and becomes the one that the workspace uses as a whole.

In terms of precedence:

nightly > stable-with-version > stable

With stable-with-version, we invoke the RA with a `--version` arg and attempt to extract a date. Given the same date as a nightly, the nightly RA will win.

Fixes rust-lang#17663
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants