doocs / advanced-java

😮 Core Interview Questions & Answers For Experienced Java(Backend) Developers | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识
https://doocs.github.io/advanced-java
Creative Commons Attribution Share Alike 4.0 International
76.18k stars 19.07k forks source link

位图法这里漏乘了整型的长度 #260

Closed sincof closed 2 years ago

sincof commented 2 years ago

java int的长度是32bit = 4 Byte,应该还要乘上4,2.5 亿个整数占的最少内存大小为:2.5e8/1024/1024/1024 * 4=3.72G