2021-06-15 05:18:08 +08:00
|
|
|
#ifndef JEMALLOC_INTERNAL_HPA_HOOKS_H
|
|
|
|
#define JEMALLOC_INTERNAL_HPA_HOOKS_H
|
|
|
|
|
2023-06-10 08:37:47 +08:00
|
|
|
#include "jemalloc/internal/jemalloc_preamble.h"
|
|
|
|
#include "jemalloc/internal/nstime.h"
|
|
|
|
|
2021-06-15 05:18:08 +08:00
|
|
|
typedef struct hpa_hooks_s hpa_hooks_t;
|
|
|
|
struct hpa_hooks_s {
|
|
|
|
void *(*map)(size_t size);
|
|
|
|
void (*unmap)(void *ptr, size_t size);
|
|
|
|
void (*purge)(void *ptr, size_t size);
|
|
|
|
void (*hugify)(void *ptr, size_t size);
|
|
|
|
void (*dehugify)(void *ptr, size_t size);
|
2021-11-17 04:40:34 +08:00
|
|
|
void (*curtime)(nstime_t *r_time, bool first_reading);
|
2021-12-21 07:04:12 +08:00
|
|
|
uint64_t (*ms_since)(nstime_t *r_time);
|
2021-06-15 05:18:08 +08:00
|
|
|
};
|
|
|
|
|
2023-05-19 01:22:58 +08:00
|
|
|
extern const hpa_hooks_t hpa_hooks_default;
|
2021-06-15 05:18:08 +08:00
|
|
|
|
|
|
|
#endif /* JEMALLOC_INTERNAL_HPA_HOOKS_H */
|