GithubHelp home page GithubHelp logo

Comments (4)

Xudong-Huang avatar Xudong-Huang commented on June 1, 2024

The problem here is that the stack can't change it's address, resize or realloc the memory would change the stack address, and this would break every thing. Currently I don't know how to generate stack independent code in rust.

from may.

zhuxiujia avatar zhuxiujia commented on June 1, 2024

The problem here is that the stack can't change it's address, resize or realloc the memory would change the stack address, and this would break every thing. Currently I don't know how to generate stack independent code in rust.

Whether the required stack space size can be calculated at compile time?

from may.

MSE99 avatar MSE99 commented on June 1, 2024

The problem here is that the stack can't change it's address, resize or realloc the memory would change the stack address, and this would break every thing. Currently I don't know how to generate stack independent code in rust.

I'm not really experienced in this topic, but i was wondering if it would it still break everything if for example coroutine A doesn't have any reference to any object allocated on the stack of coroutine B, in languages like erlang coroutines do not share memory by default and memory management (garbage collection, stack resizing) happens at the coroutine level rather than globally.

from may.

zhuxiujia avatar zhuxiujia commented on June 1, 2024

The problem here is that the stack can't change it's address, resize or realloc the memory would change the stack address, and this would break every thing. Currently I don't know how to generate stack independent code in rust.

I'm not really experienced in this topic, but i was wondering if it would it still break everything if for example coroutine A doesn't have any reference to any object allocated on the stack of coroutine B, in languages like erlang coroutines do not share memory by default and memory management (garbage collection, stack resizing) happens at the coroutine level rather than globally.
The expansion and contraction of coroutine memory are generally achieved by copying stack data onto a new stack,

The expansion and contraction of coroutine memory are generally achieved by copying stack data onto a new stack,

For example, the function of the coroutine internally initializes let arr=[0u8, 1u8, 2u8];

And the variable let b=&arr [1];

After the stack space shrinks, variable b becomes invalid, which will destroy everything

from may.

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.