Last active
February 5, 2020 05:39
-
-
Save zhuyifan2013/367ff47eabd40d1b12b500c057e09247 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* VM options: -verbose:gc -Xms:20M -Xms20M -Xmn10M -XX:+PrintGCDetails -XX:PretenureSizeThreshold=3145728 | |
*/ | |
public class MemoryAllocateBigObject { | |
private static final int _1mb = 1024 * 1024; | |
public static void main(String[] args) { | |
byte[] alloc1, alloc2, alloc3, alloc4; | |
alloc1 = new byte[4 * _1mb]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment