Skip to content

Can't malloc the last 4KB of the heap #264

@MichaelBell

Description

@MichaelBell

malloc won't allocate the last 4KB of available heap (addresses in 2003F000- 20040000). A simple test program is here: https://gist.github.com/MichaelBell/a13513a483a07a41c5b74e8458fba51d

I believe the problem is _sbrk should allow heap_end to be moved up to __StackLimit. I've got a commit which appears to fix the issue but I'm not sufficiently familiar with how this is meant to work to know whether that's the correct approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions