Skip to content

Instantly share code, notes, and snippets.

View rednaxelafx's full-sized avatar

Kris Mok rednaxelafx

View GitHub Profile
@rednaxelafx
rednaxelafx / A.java
Last active April 10, 2018 08:55 — forked from anonymous/A.java
An example of vtable initialization and package access override, run on Oracle JDK8
package pkga;
public class A {
/* packcage access */ void fun() {
System.out.println("A::fun()");
}
}

尝试调整新生代的内存大小

默认不加任何参数 (16MB)

$ ./bin/node/bin/node --trace_gc dispatch.js
[29594]       31 ms: Scavenge 1.6 (37.1) -> 1.5 (38.1) MB, 1.3 ms [Runtime::PerformGC].
[29594]       63 ms: Scavenge 2.9 (39.1) -> 2.7 (40.1) MB, 1.4 ms [Runtime::PerformGC].
[29594]       87 ms: Scavenge 3.8 (40.1) -> 3.4 (41.1) MB, 0.8 ms [allocation failure].
[29594]      121 ms: Scavenge 5.8 (41.1) -> 4.8 (42.1) MB, 1.6 ms [allocation failure].