Skip to content

HEAP_LENGTH is the minimum length #142

@publicqi

Description

@publicqi
pub const HEAP_LENGTH: usize = 32 * 1024;

currently HEAP_LENGTH is 0x8000 which is the minimum and default heap length. Maximum can go up to 0x40000.

https://github.com/anza-xyz/agave/blob/de672d2a81175a866e3a947b7dbede21fe2c054d/program-runtime/src/execution_budget.rs#L24-L25

we should release the limit. also for bump allocator, instead of allocating from the end of the heap, we can grow increasingly. when there's no enough space to use, an runtime access violation will be thrown and execution will halt.

we should provide user a macro to specify heap length. the downside of setting it directly to max is that the compiler cannot generate compile-time optimization, so giving the user power to change is a better solution.

@febo since you're cleaning up the allocator can you take this one?

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