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

Heap length is end - start #3

Closed
thejpster opened this issue Nov 19, 2016 · 0 comments · Fixed by #4
Closed

Heap length is end - start #3

thejpster opened this issue Nov 19, 2016 · 0 comments · Fixed by #4

Comments

@thejpster
Copy link
Contributor

The linked list allocator crate defines the heap as [start, start + size)

fn init() calculates size as end - start - 1, which means the heap is [start, end - 1), or one byte shorter than it need be. Size should just be end - start. That's a bug on my part (but at least it's a safe bug).

The comments say the heap size is end - start + 1, which is also wrong. That would mean we included the end byte.

japaric pushed a commit that referenced this issue Nov 27, 2016
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 a pull request may close this issue.

1 participant