mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
add flags, add function declaration
This commit is contained in:
parent
e946d56ba0
commit
f8dc519a04
3 changed files with 15 additions and 0 deletions
|
@ -29,6 +29,10 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
#define MI_SECURE 0
|
||||
#endif
|
||||
|
||||
#if !defined(MI_USER_CLEANUP)
|
||||
#define MI_USER_CLEANUP 0
|
||||
#endif
|
||||
|
||||
// Define MI_DEBUG as 1 for basic assert checks and statistics
|
||||
// set it to 2 to do internal asserts,
|
||||
// and to 3 to do extensive invariant checking.
|
||||
|
|
|
@ -114,6 +114,11 @@ mi_decl_export void mi_register_deferred_free(mi_deferred_free_fun* deferred_fre
|
|||
typedef void (mi_output_fun)(const char* msg);
|
||||
mi_decl_export void mi_register_output(mi_output_fun* out) mi_attr_noexcept;
|
||||
|
||||
#if MI_USER_CLEANUP
|
||||
typedef void (mi_cleanup_fun)(void* user_data, void* p, size_t size);
|
||||
mi_decl_export void mi_register_user_cleanup(mi_cleanup_fun* out, void* user_data) mi_attr_noexcept;
|
||||
#endif
|
||||
|
||||
mi_decl_export void mi_collect(bool force) mi_attr_noexcept;
|
||||
mi_decl_export int mi_version(void) mi_attr_noexcept;
|
||||
mi_decl_export void mi_stats_reset(void) mi_attr_noexcept;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue