Coder Social home page Coder Social logo

Wasm shared heap about wasm-micro-runtime HOT 3 OPEN

WenLY1 avatar WenLY1 commented on July 22, 2024
Wasm shared heap

from wasm-micro-runtime.

Comments (3)

lum1n0us avatar lum1n0us commented on July 22, 2024 1

Would u mind giving us, the community, a quick introduction about:

  • What's shared heap?
  • What kind of questions does shared heap try to answer?
  • Is there any other options? And why we choose shared heap?

from wasm-micro-runtime.

wenyongh avatar wenyongh commented on July 22, 2024 1

@WenLY1 Many people may not know the background and the design details of the shared heap, I submitted issue #3546 to try to illustrate that, suggest you to post tasks in that issue to track and discuss instead.

from wasm-micro-runtime.

WenLY1 avatar WenLY1 commented on July 22, 2024

If wasm shared heap is enable, should the boundary check keep enabled ? In the following code, if bounds checks is disabled, should we return the offset directly or judge whether the addr is in shared heap?
In function wasm_runtime_addr_native_to_app

    if (bounds_checks) {
        if (memory_inst->memory_data <= addr && addr < memory_inst->memory_data_end) {
            ret = (uint64)(addr - memory_inst->memory_data);
            SHARED_MEMORY_UNLOCK(memory_inst);
            return ret;
        }
    }
    /* If bounds checks is disabled, return the offset directly */
    else if (addr != NULL) {
        ret = (uint64)(addr - memory_inst->memory_data);
        SHARED_MEMORY_UNLOCK(memory_inst);
        return ret;
    }

from wasm-micro-runtime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.