blob: 73adcc5f9a28247352f50a432e19f068d13b7e01 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package com.yahoo.nativec;
import com.sun.jna.Structure;
public class MallInfo2 {
private final static Throwable initException = NativeC.loadLibrary(MallInfo2.class);
public static Throwable init() {
return initException;
}
// Equivalent JNA mapping
private static class MallInfo2Struct extends Structure {
public static class ByValue extends MallInfo2Struct implements Structure.ByValue { }
public long arena; /* Non-mmapped space allocated (bytes) */
public long ordblks; /* Number of free chunks */
public long smblks; /* Number of free fastbin blocks */
public long hblks; /* Number of mmapped regions */
public long hblkhd; /* Space allocated in mmapped regions (bytes) */
public long usmblks; /* See below */
public long fsmblks; /* Space in freed fastbin blocks (bytes) */
public long uordblks; /* Total allocated space (bytes) */
public long fordblks; /* Total free space (bytes) */
public long keepcost; /* Top-most, releasable space (bytes) */
}
private static native MallInfo2Struct.ByValue mallinfo2();
public MallInfo2() {
mallinfo = mallinfo2();
}
private final MallInfo2Struct mallinfo;
}
|