GithubHelp home page GithubHelp logo

Comments (2)

ThePhD avatar ThePhD commented on June 24, 2024

The way to change how allocation is done internally in the library is to provide your own heap. The heap portion is not fully documented, but it's part of the function signature: https://ztdcuneicode.readthedocs.io/en/latest/api/heap.html

This will cause the entire API in cuneicode to use specifically that heap. You can fill in the functions from mimalloc and jemalloc to do this by making those functions and create the heap structure, then passing it into the cnc_registry_open function: https://ztdcuneicode.readthedocs.io/en/latest/api/registry.html#_CPPv417cnc_registry_openPP23cnc_conversion_registryP19cnc_conversion_heap20cnc_registry_options

If you notice any allocations not going through the heap, do let me know. In general, the entire API was designed to NOT allocate whatsoever, so if it starts allocating that means there's a problem somewhere.

from cuneicode.

ThePhD avatar ThePhD commented on June 24, 2024

If you mean "how do I stop allocation for the regular functions that aren't related to the registry", the answer is "they never allocate, ever, so it's a moot question".

Some of the convenience functions might allocate, but in that case I'd make them take a heap. The convenience functions are not here yet, however, because they require statement expressions and using those in a high-warning-level environment like I do is such a pain that I have not gotten them off the ground yet.

from cuneicode.

Related Issues (8)

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.