当前位置:网站首页>Learn to record and analyze
Learn to record and analyze
2020-11-08 15:22:00 【Irving the procedural ape】
Learn to record and analyze
Record the difficulties in learning , A little white !
I have not read the source code , Pure Xiaobai , I wrote this article just to improve myself !!! I hope you can point out the mistakes .
Curious, I looked through Integer.valueOf()
Method source code
public static Integer valueOf(int i) { if (i >= IntegerCache.low && i <= IntegerCache.high) return IntegerCache.cache[i + (-IntegerCache.low)]; return new Integer(i); }
First of all, the parameters explain :
static final int low = -128;static final int high;static final Integer[] cache;static Integer[] archivedCache;
high No assignment , So we continue to track down high attribute
static { int h = 127; // If you specify -Djava.lang.Integer.IntegerCache.high=XXX( Enter your own data ) Parameters // The following statement will be executed , Then dynamic settings h yes 127 Or set the input data String integerCacheHighPropValue = // The method is by passing a key, Get the value set manually at startup VM.getSavedProperty("java.lang.Integer.IntegerCache.high"); if (integerCacheHighPropValue != null) { try { h = Math.max(parseInt(integerCacheHighPropValue), 127); // // public static int max(int a, int b) { // return (a >= b) ? a : b; // } // Maximum array size is Integer.MAX_VALUE //32 Bit system 2147483647=2^32 h = Math.min(h, Integer.MAX_VALUE - (-low) -1); } catch( NumberFormatException nfe) { // If the property cannot be parsed into an int, ignore it. } } // find high The value of the property is determined by h Local attribute assignment high = h; // Load IntegerCache.archivedCache from archive, if possible VM.initializeFromArchive(IntegerCache.class); int size = (high - low) + 1;// Can be saved 256 Number . // As for why 256? I'm not going to talk about , Suggest yourself to search the computer storage data related concepts ! // Use the archived cache if it exists and is large enough.........
版权声明
本文为[Irving the procedural ape]所创,转载请带上原文链接,感谢
边栏推荐
- How to solve the difference between NAT IP and port IP
- 这次,快手终于比抖音'快'了!
- 阿里撕下电商标签
- 我用 Python 找出了删除我微信的所有人并将他们自动化删除了
- Solution of DEV-C + + unable to debug in Windows Environment
- Tencent, which is good at to C, how to take advantage of Tencent's cloud market share in these industries?
- Golang ICMP协议探测存活主机
- On the concurrency of update operation
- C + + things: from rice cookers to rockets, C + + is everywhere
- It's just right. It's the ideal state
猜你喜欢
关于update操作并发问题
Python basic syntax
C + + things: from rice cookers to rockets, C + + is everywhere
浅谈单调栈
GopherChina 2020大会
Don't release resources in finally, unlock a new pose!
On the software of express delivery cabinet and deposit cabinet under Windows
Huawei has an absolute advantage in the 5g mobile phone market, and the market share of Xiaomi is divided by the market survey organization
Comics: looking for the best time to buy and sell stocks
Windows下快递投递柜、寄存柜的软件初探
随机推荐
It's just right. It's the ideal state
How to make a correct summary for 7 years?
华为在5G手机市场占据绝对优势,市调机构对小米的市占出现分歧
Arduino IDE搭建ESP8266开发环境,文件下载过慢解决方法 | ESP-01制作WiFi开关教程,改造宿舍灯
技术总监7年总结,如何进行正确的沟通?
AQS analysis
Flink从入门到真香(3、从集合和文件中读取数据)
The first open source Chinese Bert pre training model in the financial field
This paper analyzes the top ten Internet of things applications in 2020!
Workers, workers soul, draw lifelong members, become a person!
构建者模式(Builder pattern)
Ubuntu20.04 access FTP server garbled problem + upload files
Examples of unconventional aggregation
Flink从入门到真香(10、Sink数据输出-Elasticsearch)
DeepMind 最新论文解读:首次提出离散概率树中的因果推理算法
Golang 系统ping程序探测存活主机(任意权限)
CSP考试须知与各种小技巧
AQS解析
GopherChina 2020大会
Millet and oppo continue to soar in the European market, and Xiaomi is even closer to apple