[BACK]Return to jemalloc.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / stdlib

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/stdlib/jemalloc.c between version 1.28 and 1.34

version 1.28, 2012/03/21 14:32:22 version 1.34, 2014/08/10 05:57:31
Line 216  __strerror_r(int e, char *s, size_t l)
Line 216  __strerror_r(int e, char *s, size_t l)
 #define STRERROR_BUF            64  #define STRERROR_BUF            64
   
 /* Minimum alignment of allocations is 2^QUANTUM_2POW_MIN bytes. */  /* Minimum alignment of allocations is 2^QUANTUM_2POW_MIN bytes. */
   
   /*
    * If you touch the TINY_MIN_2POW definition for any architecture, please
    * make sure to adjust the corresponding definition for JEMALLOC_TINY_MIN_2POW
    * in the gcc 4.8 tree in dist/gcc/tree-ssa-ccp.c and verify that a native
    * gcc is still buildable!
    */
   
 #ifdef __i386__  #ifdef __i386__
 #  define QUANTUM_2POW_MIN      4  #  define QUANTUM_2POW_MIN      4
 #  define SIZEOF_PTR_2POW       2  #  define SIZEOF_PTR_2POW       2
Line 225  __strerror_r(int e, char *s, size_t l)
Line 233  __strerror_r(int e, char *s, size_t l)
 #  define QUANTUM_2POW_MIN      4  #  define QUANTUM_2POW_MIN      4
 #  define SIZEOF_PTR_2POW       3  #  define SIZEOF_PTR_2POW       3
 #endif  #endif
   #ifdef __aarch64__
   #  define QUANTUM_2POW_MIN      4
   #  define SIZEOF_PTR_2POW       3
   #  define NO_TLS
   #endif
 #ifdef __alpha__  #ifdef __alpha__
 #  define QUANTUM_2POW_MIN      4  #  define QUANTUM_2POW_MIN      4
 #  define SIZEOF_PTR_2POW       3  #  define SIZEOF_PTR_2POW       3
   #  define TINY_MIN_2POW         3
 #  define NO_TLS  #  define NO_TLS
 #endif  #endif
 #ifdef __sparc64__  #ifdef __sparc64__
 #  define QUANTUM_2POW_MIN      4  #  define QUANTUM_2POW_MIN      4
 #  define SIZEOF_PTR_2POW       3  #  define SIZEOF_PTR_2POW       3
   #  define TINY_MIN_2POW         3
 #  define NO_TLS  #  define NO_TLS
 #endif  #endif
 #ifdef __amd64__  #ifdef __amd64__
 #  define QUANTUM_2POW_MIN      4  #  define QUANTUM_2POW_MIN      4
 #  define SIZEOF_PTR_2POW       3  #  define SIZEOF_PTR_2POW       3
   #  define TINY_MIN_2POW         3
 #endif  #endif
 #ifdef __arm__  #ifdef __arm__
 #  define QUANTUM_2POW_MIN      3  #  define QUANTUM_2POW_MIN      3
 #  define SIZEOF_PTR_2POW       2  #  define SIZEOF_PTR_2POW       2
 #  define USE_BRK  #  define USE_BRK
   #  ifdef __ARM_EABI__
   #    define TINY_MIN_2POW       3
   #  endif
 #  define NO_TLS  #  define NO_TLS
 #endif  #endif
 #ifdef __powerpc__  #ifdef __powerpc__
 #  define QUANTUM_2POW_MIN      4  #  define QUANTUM_2POW_MIN      4
 #  define SIZEOF_PTR_2POW       2  #  define SIZEOF_PTR_2POW       2
 #  define USE_BRK  #  define USE_BRK
   #  define TINY_MIN_2POW         3
 #endif  #endif
 #if defined(__sparc__) && !defined(__sparc64__)  #if defined(__sparc__) && !defined(__sparc64__)
 #  define QUANTUM_2POW_MIN      4  #  define QUANTUM_2POW_MIN      4
Line 288  __strerror_r(int e, char *s, size_t l)
Line 308  __strerror_r(int e, char *s, size_t l)
 #  define SIZEOF_INT_2POW       2  #  define SIZEOF_INT_2POW       2
 #endif  #endif
   
 /* We can't use TLS in non-PIC programs, since TLS relies on loader magic. */  
 #if (!defined(PIC) && !defined(NO_TLS))  
 #  define NO_TLS  
 #endif  
   
 /*  /*
  * Size and alignment of memory chunks that are allocated by the OS's virtual   * Size and alignment of memory chunks that are allocated by the OS's virtual
  * memory system.   * memory system.
Line 308  __strerror_r(int e, char *s, size_t l)
Line 323  __strerror_r(int e, char *s, size_t l)
 #define CACHELINE               ((size_t)(1 << CACHELINE_2POW))  #define CACHELINE               ((size_t)(1 << CACHELINE_2POW))
   
 /* Smallest size class to support. */  /* Smallest size class to support. */
 #define TINY_MIN_2POW           1  #ifndef TINY_MIN_2POW
   #define TINY_MIN_2POW           2
   #endif
   
 /*  /*
  * Maximum size class that is a multiple of the quantum, but not (necessarily)   * Maximum size class that is a multiple of the quantum, but not (necessarily)
Line 3916  _malloc_prefork(void)
Line 3933  _malloc_prefork(void)
                 if (arenas[i] != NULL)                  if (arenas[i] != NULL)
                         malloc_mutex_lock(&arenas[i]->mtx);                          malloc_mutex_lock(&arenas[i]->mtx);
         }          }
         malloc_mutex_unlock(&arenas_mtx);  
   
         malloc_mutex_lock(&base_mtx);          malloc_mutex_lock(&base_mtx);
   
Line 3934  _malloc_postfork(void)
Line 3950  _malloc_postfork(void)
   
         malloc_mutex_unlock(&base_mtx);          malloc_mutex_unlock(&base_mtx);
   
         malloc_mutex_lock(&arenas_mtx);  
         for (i = 0; i < narenas; i++) {          for (i = 0; i < narenas; i++) {
                 if (arenas[i] != NULL)                  if (arenas[i] != NULL)
                         malloc_mutex_unlock(&arenas[i]->mtx);                          malloc_mutex_unlock(&arenas[i]->mtx);

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.34

CVSweb <webmaster@jp.NetBSD.org>