1 #ifndef JEMALLOC_INTERNAL_CTL_EXTERNS_H 2 #define JEMALLOC_INTERNAL_CTL_EXTERNS_H 3 4 #pragma GCC visibility push(hidden) 5 6 int ctl_byname(tsd_t *tsd, const char *name, void *oldp, size_t *oldlenp, 7 void *newp, size_t newlen); 8 int ctl_nametomib(tsdn_t *tsdn, const char *name, size_t *mibp, 9 size_t *miblenp); 10 11 int ctl_bymib(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp, 12 size_t *oldlenp, void *newp, size_t newlen); 13 bool ctl_boot(void); 14 void ctl_prefork(tsdn_t *tsdn); 15 void ctl_postfork_parent(tsdn_t *tsdn); 16 void ctl_postfork_child(tsdn_t *tsdn); 17 18 #define xmallctl(name, oldp, oldlenp, newp, newlen) do { \ 19 if (je_mallctl(name, oldp, oldlenp, newp, newlen) \ 20 != 0) { \ 21 malloc_printf( \ 22 "<jemalloc>: Failure in xmallctl(\"%s\", ...)\n", \ 23 name); \ 24 abort(); \ 25 } \ 26 } while (0) 27 28 #define xmallctlnametomib(name, mibp, miblenp) do { \ 29 if (je_mallctlnametomib(name, mibp, miblenp) != 0) { \ 30 malloc_printf("<jemalloc>: Failure in " \ 31 "xmallctlnametomib(\"%s\", ...)\n", name); \ 32 abort(); \ 33 } \ 34 } while (0) 35 36 #define xmallctlbymib(mib, miblen, oldp, oldlenp, newp, newlen) do { \ 37 if (je_mallctlbymib(mib, miblen, oldp, oldlenp, newp, \ 38 newlen) != 0) { \ 39 malloc_write( \ 40 "<jemalloc>: Failure in xmallctlbymib()\n"); \ 41 abort(); \ 42 } \ 43 } while (0) 44 45 #pragma GCC visibility pop 46 47 #endif /* JEMALLOC_INTERNAL_CTL_EXTERNS_H */ 48