MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / main

Method main

test/test/nativemem/CallsRealloc.java:13–23  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

11 private static final int REALLOC_SIZE = 30000170;
12
13 public static void main(String[] args) throws InterruptedException {
14 final boolean once = args.length > 0 && args[0].equals("once");
15
16 do {
17 long addr = Native.malloc(MALLOC_SIZE);
18 long reallocd = Native.realloc(addr, REALLOC_SIZE);
19
20 // allocate every 1 second.
21 Thread.sleep(1000);
22 } while (!once);
23 }
24}

Callers

nothing calls this directly

Calls 4

mallocMethod · 0.95
reallocMethod · 0.95
equalsMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected