Giter VIP home page Giter VIP logo

Comments (4)

olonho avatar olonho commented on May 22, 2024 2

Probably such components better be written in C.

from kotlin-native.

olonho avatar olonho commented on May 22, 2024

Well, it's up to target platform how to link the final binary, so you could produce any image you like,
including a self-contained ELF or similar (see https://github.com/JetBrains/kotlin-native/blob/master/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/LinkStage.kt).

Regarding memory management - nothing prevents you from using automated MM in kernel environment as well, it's just a reference counter, most kernels do that themselves for some types of data. What you would need to implement for such a port is:

  • custom malloc/free (better based on some buddy algorithm)
  • custom address -> symbol mapper, if symbolic backtraces expected
  • console output with print

IIRC, there's an effort in similar direction, see https://github.com/semoro/KOS

from kotlin-native.

 avatar commented on May 22, 2024

Regarding memory management - nothing prevents you from using automated MM in kernel environment as well,

For memory mapped I/O and bootstrap structures to set up page tables, device driver ring queues on the NIC, etc, you need complete control. For some structures, refcount overhead is simply prohibitive.

from kotlin-native.

olonho avatar olonho commented on May 22, 2024

As K/N is being primarily an application development language, there's no plans to support such a feature.

from kotlin-native.

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.