Skip to content

Remove reliance on SBRK instruction #9

Description

@ggwpez

Gray Paper 0.8 removed the SBRK instruction for the hostcall grow_heap. The allocator relies on sbrk here for its initial slab.

fn sbrk(size: usize) -> *mut u8 {
// SAFETY: Allocating memory is always safe.
unsafe {
let address;
core::arch::asm!(
".insn r 0xb, 1, 0, {dst}, {size}, zero",

I will hack it to make my Service SDK work again with GP0.8, but maybe a better long term fix would be possible.

PS: I just saw the sbrk from musl, so will assume that it always links against that and use it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions