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

align small malloc-allocations even less, and test that we do #817

Merged
merged 4 commits into from
Jul 5, 2019

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jul 2, 2019

Needs rust-lang/rust#62295 to land.

Fixes #812.

let p = libc::malloc(3);
let addr = p as usize;
let unaligned = addr % 4 != 0; // test that this is not 4-aligned
libc::free(p); // FIXME have to free *after* test; should allow ptr-to-int of dangling ptr.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I should rebase before we land this; master will soon allow ptr-to-int for dangling pointers.

@RalfJung RalfJung added the S-blocked-on-rust Status: Blocked on landing a Rust PR label Jul 3, 2019
@bors
Copy link
Collaborator

bors commented Jul 5, 2019

☔ The latest upstream changes (presumably #825) made this pull request unmergeable. Please resolve the merge conflicts.

@RalfJung
Copy link
Member Author

RalfJung commented Jul 5, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 5, 2019

📌 Commit 029a294 has been approved by RalfJung

@bors
Copy link
Collaborator

bors commented Jul 5, 2019

⌛ Testing commit 029a294 with merge ad83707...

bors added a commit that referenced this pull request Jul 5, 2019
align small malloc-allocations even less, and test that we do

Needs rust-lang/rust#62295 to land.

Fixes #812.
@bors
Copy link
Collaborator

bors commented Jul 5, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: RalfJung
Pushing ad83707 to master...

@bors bors merged commit 029a294 into rust-lang:master Jul 5, 2019
@RalfJung RalfJung deleted the small-alloc branch July 6, 2019 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked-on-rust Status: Blocked on landing a Rust PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Figure out rules for minimal alignment of system allocator
2 participants