Git Product home page Git Product logo

Comments (4)

eyberg avatar eyberg commented on July 17, 2024

the page you are prob? referring to https://nanos.org/thebook lists it under 'unsupported' although it's a bit hard to read and should be cleaned up for readability purposes, no it's not supported right now but I don't see a reason why we couldn't add it

from nanos.

ls-1801 avatar ls-1801 commented on July 17, 2024

Oh, you are right, I just ctrl+f for memfd_create and totally missed the not-supported header.

I assume it wouldn't be a particularly high priority for anyone except me, so I will just tinker around a bit. Thank you for your quick response!

from nanos.

francescolavra avatar francescolavra commented on July 17, 2024

#2005 adds support for the memfd_create syscall. This syscall is implemented in a klib named "shmem" (which depends on another klib named "tmpfs"), so in order to be able to use this functionality, the unikernel image must contain the shmem and tmpfs klibs, as in the following snippet of the Ops configuration file: "Klibs": ["shmem", "tmpfs"].

Regarding the example code in the description of this issue, please note that the compiler may reorder instructions, which can make the assert() fail if the value of data[capacity] is read before writing the value of data[0]. In order to avoid this, a volatile variable can be used instead of data (see for example the code in test/runtime/shmem.c in the above PR).

from nanos.

ls-1801 avatar ls-1801 commented on July 17, 2024

Hey very cool thank you I will try that!

from nanos.

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.