void mark_method_hash(struct hashelem *ht) { int n = mm_sizeof(ht)/sizeof(struct hashelem); for (int i = 0; i < n; i++) { MM_MARK(ht[i].symbol); MM_MARK(ht[i].function); } }
size_t MM_sizeof(const void *ptr) { if (mm_global == NULL) return -1; return mm_sizeof(mm_global, ptr); }
API_EXPORT(int) ap_mm_lock(AP_MM *mm, ap_mm_lock_mode mode) STUB(mm_lock(mm, mode), FALSE) API_EXPORT(int) ap_mm_unlock(AP_MM *mm) STUB(mm_unlock(mm), FALSE) API_EXPORT(void *) ap_mm_malloc(AP_MM *mm, size_t size) STUB(mm_malloc(mm, size), NULL) API_EXPORT(void *) ap_mm_realloc(AP_MM *mm, void *ptr, size_t size) STUB(mm_realloc(mm, ptr, size), NULL) API_EXPORT(void) ap_mm_free(AP_MM *mm, void *ptr) STUB_STMT(mm_free(mm, ptr)) API_EXPORT(void *) ap_mm_calloc(AP_MM *mm, size_t number, size_t size) STUB(mm_calloc(mm, number, size), NULL) API_EXPORT(char *) ap_mm_strdup(AP_MM *mm, const char *str) STUB(mm_strdup(mm, str), NULL) API_EXPORT(size_t) ap_mm_sizeof(AP_MM *mm, void *ptr) STUB(mm_sizeof(mm, ptr), 0) API_EXPORT(size_t) ap_mm_maxsize(void) STUB(mm_maxsize(), 0) API_EXPORT(size_t) ap_mm_available(AP_MM *mm) STUB(mm_available(mm), 0) API_EXPORT(char *) ap_mm_error(void) STUB(mm_error(), NULL) API_EXPORT(void) ap_mm_display_info(AP_MM *mm) STUB_STMT(mm_display_info(mm)) API_EXPORT(void *) ap_mm_core_create(size_t size, char *file) STUB(mm_core_create(size, file), NULL) API_EXPORT(int) ap_mm_core_permission(void *core, mode_t mode, uid_t owner, gid_t group) STUB(mm_core_permission(core, mode, owner, group), -1) API_EXPORT(void) ap_mm_core_delete(void *core) STUB_STMT(mm_core_delete(core))