Skip to content

Heap length is end - start #3

Closed
@thejpster

Description

@thejpster

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions