跳到主要内容

· 阅读需 9 分钟

一个 Java 对象由三部分组成

  • 对象头
  • 实例数据
  • 对齐填充

要计算一个对象的大小, 只需要算出这三部分的大小即可

以下分析内容都基于 64 位 HotSpot 虚拟机, 并开启指针压缩

· 阅读需 7 分钟

代理模式是一种常用的设计模式, 使用一个代理对象来代替真实对象的访问, 能够在不修改真实对象的情况下增加自定义操作, 提供额外的功能

广泛用于AOP框架, 日志框架, 事务处理, 权限控制等实际场景

· 阅读需 1 分钟
Sébastien Lorber
Yangshun Tay

Docusaurus blogging features are powered by the blog plugin.

Simply add Markdown files (or folders) to the blog directory.

Regular blog authors can be added to authors.yml.

The blog post date can be extracted from filenames, such as:

  • 2019-05-30-welcome.md
  • 2019-05-30-welcome/index.md

A blog post folder can be convenient to co-locate blog post images:

Docusaurus Plushie

The blog supports tags as well!

And if you don't want a blog: just delete this directory, and use blog: false in your Docusaurus config.

· 阅读需 1 分钟
Gao Wei

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet