Giter Club home page Giter Club logo

Comments (2)

ab503044120 avatar ab503044120 commented on May 31, 2024

具体看第三章
image
如上图可以看到寄存器中有几个可保存局部变量的寄存器
image
局部变量满足以上几个条件才必须在栈内创建
这个代码才俩局部变量是可以不在栈上创建的
image

from computer-basics.

JessonYue avatar JessonYue commented on May 31, 2024

很好的思考。C语言中有个变量修饰符就做 register 变量名字。被这个修饰的变量有可能会放到存储器里面,一般CPU会有10多个寄存器,被修饰了会有选择的放入,因为满了就不会放了。所以局部变量会有2个地方。栈和寄存器,只是Java 不怎么偏向底层。所以大家忽略了。

from computer-basics.

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.