Package org.lwjgl.system.jemalloc
Class JEmacros
- java.lang.Object
-
- org.lwjgl.system.jemalloc.JEmacros
-
public class JEmacros extends java.lang.Object
Macros for jemalloc.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
JEMALLOC_VERSION
Returns the version string.static int
JEMALLOC_VERSION_BUGFIX
Returns the bugfix version.static java.lang.String
JEMALLOC_VERSION_GID
Returns the globally unique identifier (git commit hash).static int
JEMALLOC_VERSION_MAJOR
Returns the major version.static int
JEMALLOC_VERSION_MINOR
Returns the minor version.static int
JEMALLOC_VERSION_NREV
Returns the revision number.static int
MALLOCX_TCACHE_NONE
Do not use a thread-specific cache (tcache).static int
MALLOCX_ZERO
Initialize newly allocated memory to contain zero bytes.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static int
MALLOCX_ALIGN(long a)
Align the memory allocation to start at an address that is a multiple ofa
, wherea
is a power of two.static int
MALLOCX_ARENA(int a)
Use the arena specified by the indexa
(and by necessity bypass the thread cache).static int
MALLOCX_LG_ALIGN(int la)
Align the memory allocation to start at an address that is a multiple of(1 << la)
.static int
MALLOCX_TCACHE(int tc)
Use the thread-specific cache (tcache) specified by the identifiertc
, which must have been acquired via thetcache.create
mallctl.
-
-
-
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_NONE
is specified, an automatically managed tcache will be used under many circumstances. This macro cannot be used in the sameflags
argument 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 thatla
is 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
, wherea
is a power of two. This macro does not validate thata
is 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.create
mallctl. This macro does not validate thattc
specifies 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 thata
specifies an arena index in the valid range.- Parameters:
a
- the arena index
-
-