Class JEmacros



  • public class JEmacros
    extends java.lang.Object
    Macros for jemalloc.
    • 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 of a, where a is a power of two.
      static int MALLOCX_ARENA(int a)
      Use the arena specified by the index a (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 identifier tc, which must have been acquired via the tcache.create mallctl.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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). Unless JEmacros.MALLOCX_TCACHE(int) or MALLOCX_TCACHE_NONE is specified, an automatically managed tcache will be used under many circumstances. This macro cannot be used in the same flags argument as MALLOCX_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 that la 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 of a, where a is a power of two. This macro does not validate that a 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 identifier tc, which must have been acquired via the tcache.create mallctl. This macro does not validate that tc 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 index a (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 that a specifies an arena index in the valid range.
        Parameters:
        a - the arena index