Code Monkey home page Code Monkey logo

Comments (2)

heiyeluren avatar heiyeluren commented on May 18, 2024 4
  1. 如果完全没有gc问题可以不考虑,常规就是CURD的程序,无所谓是否gc的问题。

  2. 这个项目适用对象多,另外有一些需要自己独立管理内存的场景:
    a. 其实很多人有需要自己独立控制内存,比如有一个内存我想常驻,不想被没事gc就扫描一下,就可以使用xmm;
    b. 我举个例子,比如我一个配置文件,会热更新,并且经常会被程序访问这个配置文件中的内容,那我就可以放xmm里,gc不会管它。
    c. 临时变量这种,用完就扔的没必要用xmm
    d. 延展一点说:如果你有一些想要本地Cache的东西,建议采用XMM,不会频繁被gc扫描;比如有些数据要热加载,然后长期会存在,程序自己会更新,那就用XMM非常合适。

  3. 对的,就是处理类似于使用 sync.Pool 或者自己用一个[]byte存储数据不被gc的场景

希望能够帮到您~

from xmm.

luluxiao94 avatar luluxiao94 commented on May 18, 2024

感谢解答~

from xmm.

Related Issues (12)

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.