Giter Site home page Giter Site logo

Comments (1)

chenghanpeng avatar chenghanpeng commented on July 30, 2024

TLAB其实就是从堆中拿到,你可以参考书中的图理解,简单的说多个线程都从heap中取一块空间,这个空间就是TLAB,每个TLAB都不会重叠,所以线程可以无锁分配。当使用TLAB的时候,JVM要考虑内存的浪费(也就是TLAB),当发现TLAB不能满足请求的对象大小,这就涉及到一个问题:是把当前的TLAB直接认为满了,还是新分配一个新的TLAB来进行无锁的分配?如果直接认为满了,则进行填充;如果认为存在浪费,则直接把对象分配在heap中,因为涉及到多线程,所以此时分配要进行加锁。

from jdk8u60.

Related Issues (10)

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.