jemalloc_internal.h.in revision 4eeb52f080edb1f4b518249388f6c617386c00e5
1#include <sys/mman.h> 2#include <sys/param.h> 3#include <sys/syscall.h> 4#if !defined(SYS_write) && defined(__NR_write) 5#define SYS_write __NR_write 6#endif 7#include <sys/time.h> 8#include <sys/types.h> 9#include <sys/uio.h> 10 11#include <errno.h> 12#include <limits.h> 13#ifndef SIZE_T_MAX 14# define SIZE_T_MAX SIZE_MAX 15#endif 16#include <pthread.h> 17#include <sched.h> 18#include <stdarg.h> 19#include <stdbool.h> 20#include <stdio.h> 21#include <stdlib.h> 22#include <stdint.h> 23#include <stddef.h> 24#ifndef offsetof 25# define offsetof(type, member) ((size_t)&(((type *)NULL)->member)) 26#endif 27#include <inttypes.h> 28#include <string.h> 29#include <strings.h> 30#include <ctype.h> 31#include <unistd.h> 32#include <fcntl.h> 33#include <pthread.h> 34#include <math.h> 35 36#define JEMALLOC_NO_DEMANGLE 37#include "../jemalloc@install_suffix@.h" 38 39#include "jemalloc/internal/private_namespace.h" 40 41#ifdef JEMALLOC_CC_SILENCE 42#define UNUSED JEMALLOC_ATTR(unused) 43#else 44#define UNUSED 45#endif 46 47static const bool config_debug = 48#ifdef JEMALLOC_DEBUG 49 true 50#else 51 false 52#endif 53 ; 54static const bool config_dss = 55#ifdef JEMALLOC_DSS 56 true 57#else 58 false 59#endif 60 ; 61static const bool config_dynamic_page_shift = 62#ifdef JEMALLOC_DYNAMIC_PAGE_SHIFT 63 true 64#else 65 false 66#endif 67 ; 68static const bool config_fill = 69#ifdef JEMALLOC_FILL 70 true 71#else 72 false 73#endif 74 ; 75static const bool config_lazy_lock = 76#ifdef JEMALLOC_LAZY_LOCK 77 true 78#else 79 false 80#endif 81 ; 82static const bool config_prof = 83#ifdef JEMALLOC_PROF 84 true 85#else 86 false 87#endif 88 ; 89static const bool config_prof_libgcc = 90#ifdef JEMALLOC_PROF_LIBGCC 91 true 92#else 93 false 94#endif 95 ; 96static const bool config_prof_libunwind = 97#ifdef JEMALLOC_PROF_LIBUNWIND 98 true 99#else 100 false 101#endif 102 ; 103static const bool config_stats = 104#ifdef JEMALLOC_STATS 105 true 106#else 107 false 108#endif 109 ; 110static const bool config_tcache = 111#ifdef JEMALLOC_TCACHE 112 true 113#else 114 false 115#endif 116 ; 117static const bool config_tls = 118#ifdef JEMALLOC_TLS 119 true 120#else 121 false 122#endif 123 ; 124static const bool config_xmalloc = 125#ifdef JEMALLOC_XMALLOC 126 true 127#else 128 false 129#endif 130 ; 131static const bool config_ivsalloc = 132#ifdef JEMALLOC_IVSALLOC 133 true 134#else 135 false 136#endif 137 ; 138 139#if (defined(JEMALLOC_OSATOMIC) || defined(JEMALLOC_OSSPIN)) 140#include <libkern/OSAtomic.h> 141#endif 142 143#ifdef JEMALLOC_ZONE 144#include <mach/mach_error.h> 145#include <mach/mach_init.h> 146#include <mach/vm_map.h> 147#include <malloc/malloc.h> 148#endif 149 150#define RB_COMPACT 151#include "jemalloc/internal/rb.h" 152#include "jemalloc/internal/qr.h" 153#include "jemalloc/internal/ql.h" 154 155/* 156 * jemalloc can conceptually be broken into components (arena, tcache, etc.), 157 * but there are circular dependencies that cannot be broken without 158 * substantial performance degradation. In order to reduce the effect on 159 * visual code flow, read the header files in multiple passes, with one of the 160 * following cpp variables defined during each pass: 161 * 162 * JEMALLOC_H_TYPES : Preprocessor-defined constants and psuedo-opaque data 163 * types. 164 * JEMALLOC_H_STRUCTS : Data structures. 165 * JEMALLOC_H_EXTERNS : Extern data declarations and function prototypes. 166 * JEMALLOC_H_INLINES : Inline functions. 167 */ 168/******************************************************************************/ 169#define JEMALLOC_H_TYPES 170 171#define ALLOCM_LG_ALIGN_MASK ((int)0x3f) 172 173#define ZU(z) ((size_t)z) 174 175#ifndef __DECONST 176# define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var)) 177#endif 178 179#ifdef JEMALLOC_DEBUG 180 /* Disable inlining to make debugging easier. */ 181# define JEMALLOC_INLINE 182# define inline 183#else 184# define JEMALLOC_ENABLE_INLINE 185# define JEMALLOC_INLINE static inline 186#endif 187 188/* Smallest size class to support. */ 189#define LG_TINY_MIN 3 190#define TINY_MIN (1U << LG_TINY_MIN) 191 192/* 193 * Minimum alignment of allocations is 2^LG_QUANTUM bytes (ignoring tiny size 194 * classes). 195 */ 196#ifndef LG_QUANTUM 197# ifdef __i386__ 198# define LG_QUANTUM 4 199# endif 200# ifdef __ia64__ 201# define LG_QUANTUM 4 202# endif 203# ifdef __alpha__ 204# define LG_QUANTUM 4 205# endif 206# ifdef __sparc64__ 207# define LG_QUANTUM 4 208# endif 209# if (defined(__amd64__) || defined(__x86_64__)) 210# define LG_QUANTUM 4 211# endif 212# ifdef __arm__ 213# define LG_QUANTUM 3 214# endif 215# ifdef __mips__ 216# define LG_QUANTUM 3 217# endif 218# ifdef __powerpc__ 219# define LG_QUANTUM 4 220# endif 221# ifdef __s390x__ 222# define LG_QUANTUM 4 223# endif 224# ifdef __SH4__ 225# define LG_QUANTUM 4 226# endif 227# ifdef __tile__ 228# define LG_QUANTUM 4 229# endif 230# ifndef LG_QUANTUM 231# error "No LG_QUANTUM definition for architecture; specify via CPPFLAGS" 232# endif 233#endif 234 235#define QUANTUM ((size_t)(1U << LG_QUANTUM)) 236#define QUANTUM_MASK (QUANTUM - 1) 237 238/* Return the smallest quantum multiple that is >= a. */ 239#define QUANTUM_CEILING(a) \ 240 (((a) + QUANTUM_MASK) & ~QUANTUM_MASK) 241 242#define LONG ((size_t)(1U << LG_SIZEOF_LONG)) 243#define LONG_MASK (LONG - 1) 244 245/* Return the smallest long multiple that is >= a. */ 246#define LONG_CEILING(a) \ 247 (((a) + LONG_MASK) & ~LONG_MASK) 248 249#define SIZEOF_PTR (1U << LG_SIZEOF_PTR) 250#define PTR_MASK (SIZEOF_PTR - 1) 251 252/* Return the smallest (void *) multiple that is >= a. */ 253#define PTR_CEILING(a) \ 254 (((a) + PTR_MASK) & ~PTR_MASK) 255 256/* 257 * Maximum size of L1 cache line. This is used to avoid cache line aliasing. 258 * In addition, this controls the spacing of cacheline-spaced size classes. 259 */ 260#define LG_CACHELINE 6 261#define CACHELINE ((size_t)(1U << LG_CACHELINE)) 262#define CACHELINE_MASK (CACHELINE - 1) 263 264/* Return the smallest cacheline multiple that is >= s. */ 265#define CACHELINE_CEILING(s) \ 266 (((s) + CACHELINE_MASK) & ~CACHELINE_MASK) 267 268/* Page size. STATIC_PAGE_SHIFT is determined by the configure script. */ 269#define STATIC_PAGE_SIZE ((size_t)(1U << STATIC_PAGE_SHIFT)) 270#define STATIC_PAGE_MASK ((size_t)(STATIC_PAGE_SIZE - 1)) 271#ifdef PAGE_SHIFT 272# undef PAGE_SHIFT 273#endif 274#ifdef PAGE_SIZE 275# undef PAGE_SIZE 276#endif 277#ifdef PAGE_MASK 278# undef PAGE_MASK 279#endif 280#define PAGE_SHIFT STATIC_PAGE_SHIFT 281#define PAGE_SIZE STATIC_PAGE_SIZE 282#define PAGE_MASK STATIC_PAGE_MASK 283 284/* Return the smallest pagesize multiple that is >= s. */ 285#define PAGE_CEILING(s) \ 286 (((s) + PAGE_MASK) & ~PAGE_MASK) 287 288#include "jemalloc/internal/util.h" 289#include "jemalloc/internal/atomic.h" 290#include "jemalloc/internal/prng.h" 291#include "jemalloc/internal/ckh.h" 292#include "jemalloc/internal/size_classes.h" 293#include "jemalloc/internal/stats.h" 294#include "jemalloc/internal/ctl.h" 295#include "jemalloc/internal/mutex.h" 296#include "jemalloc/internal/tsd.h" 297#include "jemalloc/internal/mb.h" 298#include "jemalloc/internal/extent.h" 299#include "jemalloc/internal/arena.h" 300#include "jemalloc/internal/bitmap.h" 301#include "jemalloc/internal/base.h" 302#include "jemalloc/internal/chunk.h" 303#include "jemalloc/internal/huge.h" 304#include "jemalloc/internal/rtree.h" 305#include "jemalloc/internal/tcache.h" 306#include "jemalloc/internal/hash.h" 307#ifdef JEMALLOC_ZONE 308#include "jemalloc/internal/zone.h" 309#endif 310#include "jemalloc/internal/prof.h" 311 312#undef JEMALLOC_H_TYPES 313/******************************************************************************/ 314#define JEMALLOC_H_STRUCTS 315 316#include "jemalloc/internal/util.h" 317#include "jemalloc/internal/atomic.h" 318#include "jemalloc/internal/prng.h" 319#include "jemalloc/internal/ckh.h" 320#include "jemalloc/internal/size_classes.h" 321#include "jemalloc/internal/stats.h" 322#include "jemalloc/internal/ctl.h" 323#include "jemalloc/internal/mutex.h" 324#include "jemalloc/internal/tsd.h" 325#include "jemalloc/internal/mb.h" 326#include "jemalloc/internal/bitmap.h" 327#include "jemalloc/internal/extent.h" 328#include "jemalloc/internal/arena.h" 329#include "jemalloc/internal/base.h" 330#include "jemalloc/internal/chunk.h" 331#include "jemalloc/internal/huge.h" 332#include "jemalloc/internal/rtree.h" 333#include "jemalloc/internal/tcache.h" 334#include "jemalloc/internal/hash.h" 335#ifdef JEMALLOC_ZONE 336#include "jemalloc/internal/zone.h" 337#endif 338#include "jemalloc/internal/prof.h" 339 340typedef struct { 341 uint64_t allocated; 342 uint64_t deallocated; 343} thread_allocated_t; 344/* 345 * The JEMALLOC_CONCAT() wrapper is necessary to pass {0, 0} via a cpp macro 346 * argument. 347 */ 348#define THREAD_ALLOCATED_INITIALIZER JEMALLOC_CONCAT({0, 0}) 349 350#undef JEMALLOC_H_STRUCTS 351/******************************************************************************/ 352#define JEMALLOC_H_EXTERNS 353 354extern bool opt_abort; 355extern bool opt_junk; 356extern bool opt_xmalloc; 357extern bool opt_zero; 358extern size_t opt_narenas; 359 360#ifdef DYNAMIC_PAGE_SHIFT 361extern size_t pagesize; 362extern size_t pagesize_mask; 363extern size_t lg_pagesize; 364#endif 365 366/* Number of CPUs. */ 367extern unsigned ncpus; 368 369extern malloc_mutex_t arenas_lock; /* Protects arenas initialization. */ 370/* 371 * Arenas that are used to service external requests. Not all elements of the 372 * arenas array are necessarily used; arenas are created lazily as needed. 373 */ 374extern arena_t **arenas; 375extern unsigned narenas; 376 377arena_t *arenas_extend(unsigned ind); 378void arenas_cleanup(void *arg); 379arena_t *choose_arena_hard(void); 380void jemalloc_prefork(void); 381void jemalloc_postfork_parent(void); 382void jemalloc_postfork_child(void); 383 384#include "jemalloc/internal/util.h" 385#include "jemalloc/internal/atomic.h" 386#include "jemalloc/internal/prng.h" 387#include "jemalloc/internal/ckh.h" 388#include "jemalloc/internal/size_classes.h" 389#include "jemalloc/internal/stats.h" 390#include "jemalloc/internal/ctl.h" 391#include "jemalloc/internal/mutex.h" 392#include "jemalloc/internal/tsd.h" 393#include "jemalloc/internal/mb.h" 394#include "jemalloc/internal/bitmap.h" 395#include "jemalloc/internal/extent.h" 396#include "jemalloc/internal/arena.h" 397#include "jemalloc/internal/base.h" 398#include "jemalloc/internal/chunk.h" 399#include "jemalloc/internal/huge.h" 400#include "jemalloc/internal/rtree.h" 401#include "jemalloc/internal/tcache.h" 402#include "jemalloc/internal/hash.h" 403#ifdef JEMALLOC_ZONE 404#include "jemalloc/internal/zone.h" 405#endif 406#include "jemalloc/internal/prof.h" 407 408#undef JEMALLOC_H_EXTERNS 409/******************************************************************************/ 410#define JEMALLOC_H_INLINES 411 412#include "jemalloc/internal/util.h" 413#include "jemalloc/internal/atomic.h" 414#include "jemalloc/internal/prng.h" 415#include "jemalloc/internal/ckh.h" 416#include "jemalloc/internal/size_classes.h" 417#include "jemalloc/internal/stats.h" 418#include "jemalloc/internal/ctl.h" 419#include "jemalloc/internal/mutex.h" 420#include "jemalloc/internal/tsd.h" 421#include "jemalloc/internal/mb.h" 422#include "jemalloc/internal/extent.h" 423#include "jemalloc/internal/base.h" 424#include "jemalloc/internal/chunk.h" 425#include "jemalloc/internal/huge.h" 426 427#ifndef JEMALLOC_ENABLE_INLINE 428malloc_tsd_protos(JEMALLOC_ATTR(unused), arenas, arena_t *) 429 430size_t s2u(size_t size); 431size_t sa2u(size_t size, size_t alignment, size_t *run_size_p); 432arena_t *choose_arena(void); 433#endif 434 435#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_C_)) 436/* 437 * Map of pthread_self() --> arenas[???], used for selecting an arena to use 438 * for allocations. 439 */ 440malloc_tsd_externs(arenas, arena_t *) 441malloc_tsd_funcs(JEMALLOC_INLINE, arenas, arena_t *, NULL, arenas_cleanup) 442 443/* 444 * Compute usable size that would result from allocating an object with the 445 * specified size. 446 */ 447JEMALLOC_INLINE size_t 448s2u(size_t size) 449{ 450 451 if (size <= SMALL_MAXCLASS) 452 return (arena_bin_info[SMALL_SIZE2BIN(size)].reg_size); 453 if (size <= arena_maxclass) 454 return (PAGE_CEILING(size)); 455 return (CHUNK_CEILING(size)); 456} 457 458/* 459 * Compute usable size that would result from allocating an object with the 460 * specified size and alignment. 461 */ 462JEMALLOC_INLINE size_t 463sa2u(size_t size, size_t alignment, size_t *run_size_p) 464{ 465 size_t usize; 466 467 /* 468 * Round size up to the nearest multiple of alignment. 469 * 470 * This done, we can take advantage of the fact that for each small 471 * size class, every object is aligned at the smallest power of two 472 * that is non-zero in the base two representation of the size. For 473 * example: 474 * 475 * Size | Base 2 | Minimum alignment 476 * -----+----------+------------------ 477 * 96 | 1100000 | 32 478 * 144 | 10100000 | 32 479 * 192 | 11000000 | 64 480 */ 481 usize = (size + (alignment - 1)) & (-alignment); 482 /* 483 * (usize < size) protects against the combination of maximal 484 * alignment and size greater than maximal alignment. 485 */ 486 if (usize < size) { 487 /* size_t overflow. */ 488 return (0); 489 } 490 491 if (usize <= arena_maxclass && alignment <= PAGE_SIZE) { 492 if (usize <= SMALL_MAXCLASS) 493 return (arena_bin_info[SMALL_SIZE2BIN(usize)].reg_size); 494 return (PAGE_CEILING(usize)); 495 } else { 496 size_t run_size; 497 498 /* 499 * We can't achieve subpage alignment, so round up alignment 500 * permanently; it makes later calculations simpler. 501 */ 502 alignment = PAGE_CEILING(alignment); 503 usize = PAGE_CEILING(size); 504 /* 505 * (usize < size) protects against very large sizes within 506 * PAGE_SIZE of SIZE_T_MAX. 507 * 508 * (usize + alignment < usize) protects against the 509 * combination of maximal alignment and usize large enough 510 * to cause overflow. This is similar to the first overflow 511 * check above, but it needs to be repeated due to the new 512 * usize value, which may now be *equal* to maximal 513 * alignment, whereas before we only detected overflow if the 514 * original size was *greater* than maximal alignment. 515 */ 516 if (usize < size || usize + alignment < usize) { 517 /* size_t overflow. */ 518 return (0); 519 } 520 521 /* 522 * Calculate the size of the over-size run that arena_palloc() 523 * would need to allocate in order to guarantee the alignment. 524 */ 525 if (usize >= alignment) 526 run_size = usize + alignment - PAGE_SIZE; 527 else { 528 /* 529 * It is possible that (alignment << 1) will cause 530 * overflow, but it doesn't matter because we also 531 * subtract PAGE_SIZE, which in the case of overflow 532 * leaves us with a very large run_size. That causes 533 * the first conditional below to fail, which means 534 * that the bogus run_size value never gets used for 535 * anything important. 536 */ 537 run_size = (alignment << 1) - PAGE_SIZE; 538 } 539 if (run_size_p != NULL) 540 *run_size_p = run_size; 541 542 if (run_size <= arena_maxclass) 543 return (PAGE_CEILING(usize)); 544 return (CHUNK_CEILING(usize)); 545 } 546} 547 548/* Choose an arena based on a per-thread value. */ 549JEMALLOC_INLINE arena_t * 550choose_arena(void) 551{ 552 arena_t *ret; 553 554 if ((ret = *arenas_tsd_get()) == NULL) { 555 ret = choose_arena_hard(); 556 assert(ret != NULL); 557 } 558 559 return (ret); 560} 561#endif 562 563#include "jemalloc/internal/bitmap.h" 564#include "jemalloc/internal/rtree.h" 565#include "jemalloc/internal/tcache.h" 566#include "jemalloc/internal/arena.h" 567#include "jemalloc/internal/hash.h" 568#ifdef JEMALLOC_ZONE 569#include "jemalloc/internal/zone.h" 570#endif 571 572#ifndef JEMALLOC_ENABLE_INLINE 573void *imalloc(size_t size); 574void *icalloc(size_t size); 575void *ipalloc(size_t usize, size_t alignment, bool zero); 576size_t isalloc(const void *ptr); 577size_t ivsalloc(const void *ptr); 578void idalloc(void *ptr); 579void *iralloc(void *ptr, size_t size, size_t extra, size_t alignment, 580 bool zero, bool no_move); 581malloc_tsd_protos(JEMALLOC_ATTR(unused), thread_allocated, thread_allocated_t) 582#endif 583 584#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_C_)) 585JEMALLOC_INLINE void * 586imalloc(size_t size) 587{ 588 589 assert(size != 0); 590 591 if (size <= arena_maxclass) 592 return (arena_malloc(size, false)); 593 else 594 return (huge_malloc(size, false)); 595} 596 597JEMALLOC_INLINE void * 598icalloc(size_t size) 599{ 600 601 if (size <= arena_maxclass) 602 return (arena_malloc(size, true)); 603 else 604 return (huge_malloc(size, true)); 605} 606 607JEMALLOC_INLINE void * 608ipalloc(size_t usize, size_t alignment, bool zero) 609{ 610 void *ret; 611 612 assert(usize != 0); 613 assert(usize == sa2u(usize, alignment, NULL)); 614 615 if (usize <= arena_maxclass && alignment <= PAGE_SIZE) 616 ret = arena_malloc(usize, zero); 617 else { 618 size_t run_size JEMALLOC_CC_SILENCE_INIT(0); 619 620 /* 621 * Ideally we would only ever call sa2u() once per aligned 622 * allocation request, and the caller of this function has 623 * already done so once. However, it's rather burdensome to 624 * require every caller to pass in run_size, especially given 625 * that it's only relevant to large allocations. Therefore, 626 * just call it again here in order to get run_size. 627 */ 628 sa2u(usize, alignment, &run_size); 629 if (run_size <= arena_maxclass) { 630 ret = arena_palloc(choose_arena(), usize, run_size, 631 alignment, zero); 632 } else if (alignment <= chunksize) 633 ret = huge_malloc(usize, zero); 634 else 635 ret = huge_palloc(usize, alignment, zero); 636 } 637 638 assert(((uintptr_t)ret & (alignment - 1)) == 0); 639 return (ret); 640} 641 642JEMALLOC_INLINE size_t 643isalloc(const void *ptr) 644{ 645 size_t ret; 646 arena_chunk_t *chunk; 647 648 assert(ptr != NULL); 649 650 chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); 651 if (chunk != ptr) { 652 /* Region. */ 653 if (config_prof) 654 ret = arena_salloc_demote(ptr); 655 else 656 ret = arena_salloc(ptr); 657 } else 658 ret = huge_salloc(ptr); 659 660 return (ret); 661} 662 663JEMALLOC_INLINE size_t 664ivsalloc(const void *ptr) 665{ 666 667 /* Return 0 if ptr is not within a chunk managed by jemalloc. */ 668 if (rtree_get(chunks_rtree, (uintptr_t)CHUNK_ADDR2BASE(ptr)) == NULL) 669 return (0); 670 671 return (isalloc(ptr)); 672} 673 674JEMALLOC_INLINE void 675idalloc(void *ptr) 676{ 677 arena_chunk_t *chunk; 678 679 assert(ptr != NULL); 680 681 chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); 682 if (chunk != ptr) 683 arena_dalloc(chunk->arena, chunk, ptr); 684 else 685 huge_dalloc(ptr, true); 686} 687 688JEMALLOC_INLINE void * 689iralloc(void *ptr, size_t size, size_t extra, size_t alignment, bool zero, 690 bool no_move) 691{ 692 void *ret; 693 size_t oldsize; 694 695 assert(ptr != NULL); 696 assert(size != 0); 697 698 oldsize = isalloc(ptr); 699 700 if (alignment != 0 && ((uintptr_t)ptr & ((uintptr_t)alignment-1)) 701 != 0) { 702 size_t usize, copysize; 703 704 /* 705 * Existing object alignment is inadquate; allocate new space 706 * and copy. 707 */ 708 if (no_move) 709 return (NULL); 710 usize = sa2u(size + extra, alignment, NULL); 711 if (usize == 0) 712 return (NULL); 713 ret = ipalloc(usize, alignment, zero); 714 if (ret == NULL) { 715 if (extra == 0) 716 return (NULL); 717 /* Try again, without extra this time. */ 718 usize = sa2u(size, alignment, NULL); 719 if (usize == 0) 720 return (NULL); 721 ret = ipalloc(usize, alignment, zero); 722 if (ret == NULL) 723 return (NULL); 724 } 725 /* 726 * Copy at most size bytes (not size+extra), since the caller 727 * has no expectation that the extra bytes will be reliably 728 * preserved. 729 */ 730 copysize = (size < oldsize) ? size : oldsize; 731 memcpy(ret, ptr, copysize); 732 idalloc(ptr); 733 return (ret); 734 } 735 736 if (no_move) { 737 if (size <= arena_maxclass) { 738 return (arena_ralloc_no_move(ptr, oldsize, size, 739 extra, zero)); 740 } else { 741 return (huge_ralloc_no_move(ptr, oldsize, size, 742 extra)); 743 } 744 } else { 745 if (size + extra <= arena_maxclass) { 746 return (arena_ralloc(ptr, oldsize, size, extra, 747 alignment, zero)); 748 } else { 749 return (huge_ralloc(ptr, oldsize, size, extra, 750 alignment, zero)); 751 } 752 } 753} 754 755malloc_tsd_externs(thread_allocated, thread_allocated_t) 756malloc_tsd_funcs(JEMALLOC_INLINE, thread_allocated, thread_allocated_t, 757 THREAD_ALLOCATED_INITIALIZER, malloc_tsd_no_cleanup) 758#endif 759 760#include "jemalloc/internal/prof.h" 761 762#undef JEMALLOC_H_INLINES 763/******************************************************************************/ 764