1 #ifndef JEMALLOC_INTERNAL_ACTIVITY_CALLBACK_H 2 #define JEMALLOC_INTERNAL_ACTIVITY_CALLBACK_H 3 4 /* 5 * The callback to be executed "periodically", in response to some amount of 6 * allocator activity. 7 * 8 * This callback need not be computing any sort of peak (although that's the 9 * intended first use case), but we drive it from the peak counter, so it's 10 * keeps things tidy to keep it here. 11 * 12 * The calls to this thunk get driven by the peak_event module. 13 */ 14 #define ACTIVITY_CALLBACK_THUNK_INITIALIZER {NULL, NULL} 15 typedef void (*activity_callback_t)(void *uctx, uint64_t allocated, 16 uint64_t deallocated); 17 typedef struct activity_callback_thunk_s activity_callback_thunk_t; 18 struct activity_callback_thunk_s { 19 activity_callback_t callback; 20 void *uctx; 21 }; 22 23 #endif /* JEMALLOC_INTERNAL_ACTIVITY_CALLBACK_H */ 24