Skip to content

Add CLI option to reserve a fixed memory region at the start of the Solidity free-memory area #451

Description

@PavelKopyl

Feature Request

Summary
Add a new command-line option (e.g. --reserve-heap-start ) that carves out a reserved memory region beginning at offset 128 (the standard Solidity free-memory base). All other dynamic allocations,
the EVM stack spill area and any memory allocated by the compiled contract via the free memory pointer, must be placed after this reserved region.

Rationale

Some use cases require a fixed, compiler-untouched memory window at a well-known address immediately above the Solidity scratch/zero-slot area. For example, this covers custom caching mechanisms managed within inline assembly statements.
Currently there is no way to instruct solx to leave this area alone: the free memory pointer starts at 128 and both the spill area and contract allocations begin there immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions