GithubHelp home page GithubHelp logo

%value and memory management about packcc HOT 2 CLOSED

arithy avatar arithy commented on July 17, 2024
%value and memory management

from packcc.

Comments (2)

arithy avatar arithy commented on July 17, 2024

I see in the TinyC example that a second data structure is passed around in auxil that looks like it holds the AST. Is this the intended approach for all applications?

Yes, it is. In the Tiny-C example, I introduce the manager, which is passed via auxil, to hold all AST nodes so that the application can surely deallocate all memory used by AST nodes even if there are nodes that have no parent. If you ensure that all nodes have parents by designing the PEG finely, you can deallocate all memory by tree traversal from the root node.

PackCC doesn't care memory allocation or deallocation of application-defined data. Applications should have responsibility to manage them. However, If you have any idea of a concrete specification of the functionality to simplify the management, I'll consider to introduce it.

from packcc.

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.