Package org.lwjgl.system.jemalloc
Class JEmacros
- java.lang.Object
-
- org.lwjgl.system.jemalloc.JEmacros
-
public class JEmacros extends java.lang.ObjectMacros for jemalloc.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringJEMALLOC_VERSIONReturns the version string.static intJEMALLOC_VERSION_BUGFIXReturns the bugfix version.static java.lang.StringJEMALLOC_VERSION_GIDReturns the globally unique identifier (git commit hash).static intJEMALLOC_VERSION_MAJORReturns the major version.static intJEMALLOC_VERSION_MINORReturns the minor version.static intJEMALLOC_VERSION_NREVReturns the revision number.static intMALLOCX_TCACHE_NONEDo not use a thread-specific cache (tcache).static intMALLOCX_ZEROInitialize newly allocated memory to contain zero bytes.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static intMALLOCX_ALIGN(long a)Align the memory allocation to start at an address that is a multiple ofa, whereais a power of two.static intMALLOCX_ARENA(int a)Use the arena specified by the indexa(and by necessity bypass the thread cache).static intMALLOCX_LG_ALIGN(int la)Align the memory allocation to start at an address that is a multiple of(1 << la).static intMALLOCX_TCACHE(int tc)Use the thread-specific cache (tcache) specified by the identifiertc, which must have been acquired via thetcache.createmallctl.
-
-
-
Field Detail
-
JEMALLOC_VERSION
public static final java.lang.String JEMALLOC_VERSION
Returns the version string.
-
JEMALLOC_VERSION_MAJOR
public static final int JEMALLOC_VERSION_MAJOR
Returns the major version.
-
JEMALLOC_VERSION_MINOR
public static final int JEMALLOC_VERSION_MINOR
Returns the minor version.
-
JEMALLOC_VERSION_BUGFIX
public static final int JEMALLOC_VERSION_BUGFIX
Returns the bugfix version.
-
JEMALLOC_VERSION_NREV
public static final int JEMALLOC_VERSION_NREV
Returns the revision number.
-
JEMALLOC_VERSION_GID
public static final java.lang.String JEMALLOC_VERSION_GID
Returns the globally unique identifier (git commit hash).
-
MALLOCX_ZERO
public static final int MALLOCX_ZERO
Initialize newly allocated memory to contain zero bytes. In the growing reallocation case, the real size prior to reallocation defines the boundary between untouched bytes and those that are initialized to contain zero bytes. If this macro is absent, newly allocated memory is uninitialized.
-
MALLOCX_TCACHE_NONE
public static final int MALLOCX_TCACHE_NONE
Do not use a thread-specific cache (tcache). UnlessJEmacros.MALLOCX_TCACHE(int)orMALLOCX_TCACHE_NONEis specified, an automatically managed tcache will be used under many circumstances. This macro cannot be used in the sameflagsargument asMALLOCX_TCACHE(tc).
-
-
Method Detail
-
MALLOCX_LG_ALIGN
public static int MALLOCX_LG_ALIGN(int la)
Align the memory allocation to start at an address that is a multiple of(1 << la). This macro does not validate thatlais within the valid range.- Parameters:
la- the alignment shift
-
MALLOCX_ALIGN
public static int MALLOCX_ALIGN(long a)
Align the memory allocation to start at an address that is a multiple ofa, whereais a power of two. This macro does not validate thatais a power of 2.- Parameters:
a- the alignment
-
MALLOCX_TCACHE
public static int MALLOCX_TCACHE(int tc)
Use the thread-specific cache (tcache) specified by the identifiertc, which must have been acquired via thetcache.createmallctl. This macro does not validate thattcspecifies a valid identifier.- Parameters:
tc- the thread-specific cache
-
MALLOCX_ARENA
public static int MALLOCX_ARENA(int a)
Use the arena specified by the indexa(and by necessity bypass the thread cache). This macro has no effect for huge regions, nor for regions that were allocated via an arena other than the one specified. This macro does not validate thataspecifies an arena index in the valid range.- Parameters:
a- the arena index
-
-