Skip to content

Data-Structure ModuleTranslation depends on wasm-data liftetime #33

@frehberg

Description

@frehberg

The following function of is creating the ModuleTranslation from raw WASM-data

impl<'data, 'module> ModuleEnvironment<'data, 'module> {
   pub fn translate(mut self, data: &'data [u8]) -> WasmResult<ModuleTranslation<'data, 'module>> {};
}

Due to this, the raw-wasm data must outlive Translation/Compilation. This may cause double memory consumption, keeping the raw-wasm-data and translated/compiled representation in memory.

I would expect that after invocation of function translate, the raw WASM-data could be dropped/deleted to reduce memory consumption.

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