e98a620c59
Add the pages_[no]huge() functions, which toggle huge page state via madvise(..., MADV_[NO]HUGEPAGE) calls. The first time a page run is purged from within an arena chunk, call pages_nohuge() to tell the kernel to make no further attempts to back the chunk with huge pages. Upon arena chunk deletion, restore the associated virtual memory to its original state via pages_huge(). This resolves #243.
30 lines
1.1 KiB
C
30 lines
1.1 KiB
C
/******************************************************************************/
|
|
#ifdef JEMALLOC_H_TYPES
|
|
|
|
#endif /* JEMALLOC_H_TYPES */
|
|
/******************************************************************************/
|
|
#ifdef JEMALLOC_H_STRUCTS
|
|
|
|
#endif /* JEMALLOC_H_STRUCTS */
|
|
/******************************************************************************/
|
|
#ifdef JEMALLOC_H_EXTERNS
|
|
|
|
void *pages_map(void *addr, size_t size, bool *commit);
|
|
void pages_unmap(void *addr, size_t size);
|
|
void *pages_trim(void *addr, size_t alloc_size, size_t leadsize,
|
|
size_t size, bool *commit);
|
|
bool pages_commit(void *addr, size_t size);
|
|
bool pages_decommit(void *addr, size_t size);
|
|
bool pages_purge(void *addr, size_t size);
|
|
bool pages_huge(void *addr, size_t size);
|
|
bool pages_nohuge(void *addr, size_t size);
|
|
void pages_boot(void);
|
|
|
|
#endif /* JEMALLOC_H_EXTERNS */
|
|
/******************************************************************************/
|
|
#ifdef JEMALLOC_H_INLINES
|
|
|
|
#endif /* JEMALLOC_H_INLINES */
|
|
/******************************************************************************/
|
|
|