当前位置:网站首页>静态变量存储在哪个区
静态变量存储在哪个区
2022-08-10 13:43:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
美团2017校园招聘 Android 静态变量存储在__区 A 全局区 B 堆 C 栈 D 常量区
2017年3月21日19:00开始笔试,选项凭回忆打的,未全匹配。 本人参考答案:A
知识点
内存到底分几个区?
1、栈区(stack)— 由编译器自动分配释放 ,存放函数的参数值,局部变量的值等。
2、堆区(heap) — 一般由程序员分配释放, 若程序员不释放,程序结束时可能由os回收 。注意它与数据结构中的堆是两回事,分配方式倒是类似于链表。
3、全局区(静态区)(static)—全局变量和静态变量的存储是放在一块的,初始化的全局变量和静态变量在一块区域, 未初始化的全局变量和未初始化的静态变量在相邻的另一块区域。程序结束后有系统释放。
4、文字常量区 —常量字符串就是放在这里的。 程序结束后由系统释放。
5、程序代码区—存放函数体的二进制代码。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/130019.html原文链接:https://javaforall.cn
边栏推荐
- Efficient and Robust 2D-to-BEV Representation Learning via Geometry-guided Kernel Transformer Paper Notes
- [Study Notes] Persistence of Redis
- “Oracle 封禁了我的账户”
- 【MinIO】Using tools
- Lithium battery technology
- vivado闪退或者message无显示
- 一种能让大型数据聚类快2000倍的方法,真不戳
- 高数_证明_曲率公式
- ABAP file operations involved in the Chinese character set of problems and solutions for trying to read
- WebView的优化与常见问题解决方案
猜你喜欢
写不完的数学试卷-----试卷生成器(Qt含源码)
Using data intelligence, Amazon cloud technology helps companies build endogenous brand growth
一个 CRM One Order Application log 的单元测试报表
Ethernet channel Ethernet channel
【Gazebo入门教程】第三讲 SDF文件的静/动态编程建模
发送post请求前台无法获取数据
AWS Security Fundamentals
Short read or OOM loading DB. Unrecoverable error, aborting now
laravel throws the error to Dingding
SQL学习(基础)
随机推荐
Short read or OOM loading DB. Unrecoverable error, aborting now
Drive IT Modernization with Low Code
高数_证明_曲率公式
The basic components of Loudi plant cell laboratory construction
Matrix Keyboard & Calculator Small Project Based on 51 (UcosII)
Network Saboteur
SecureCRTPortable – 破解
【剑指offer】---数组中的重复数字
Fragment's show and hide
记录几道整型提升的题目
R语言实战应用案例:论文篇(一)-特殊柱形图绘制
bgp dual plane experiment routing strategy to control traffic
CodeForces - 834C
PHP judges whether the file has content, and if there is no content, copy another file to write
作业8.9 构建TCP协议的服务器
系统架构系列文章三--解决传统企业核心系统的性能问题
八大排序总是忘?快来这里~
tensorflow安装踩坑总结
AWS 安全基础知识
laravel throws the error to Dingding