@@ -314,6 +314,9 @@ extern "C" {
314314 /// Merge thread local statistics with the main statistics and reset.
315315 ///
316316 /// Note: This function is thread safe.
317+ ///
318+ /// Note: not available in v3 (declared in header but not implemented).
319+ #[ cfg( not( feature = "v3" ) ) ]
317320 pub fn mi_stats_merge ( ) ;
318321
319322 /// Return the mimalloc version number.
@@ -525,6 +528,9 @@ pub const mi_option_reserve_huge_os_pages_at: mi_option_t = 8;
525528pub const mi_option_reserve_os_memory: mi_option_t = 9 ;
526529
527530/// Option (experimental) the first N segments per thread are not eagerly committed (=1).
531+ ///
532+ /// Note: removed/renamed in v3 (`mi_option_deprecated_eager_commit_delay`).
533+ #[ cfg( not( feature = "v3" ) ) ]
528534pub const mi_option_eager_commit_delay: mi_option_t = 14 ;
529535
530536/// Option (experimental) Pretend there are at most N NUMA nodes; Use 0 to use the actual detected NUMA nodes at runtime.
@@ -965,12 +971,34 @@ extern "C" {
965971 /// Returns `true` if all areas and blocks were visited.
966972 ///
967973 /// Passing a `None` visitor is allowed, and is a no-op.
974+ #[ cfg( not( feature = "v3" ) ) ]
968975 pub fn mi_heap_visit_blocks (
969976 heap : * const mi_heap_t ,
970977 visit_all_blocks : bool ,
971978 visitor : mi_block_visit_fun ,
972979 arg : * mut c_void ,
973980 ) -> bool ;
981+ /// Visit all areas and blocks in `heap`.
982+ ///
983+ /// If `visit_all_blocks` is false, the `visitor` is only called once for
984+ /// every heap area. If it's true, the `visitor` is also called for every
985+ /// allocated block inside every area (with `!block.is_null()`). Return
986+ /// `false` from the `visitor` to return early.
987+ ///
988+ /// `arg` is an extra argument passed into the `visitor`.
989+ ///
990+ /// Returns `true` if all areas and blocks were visited.
991+ ///
992+ /// Passing a `None` visitor is allowed, and is a no-op.
993+ ///
994+ /// Note: in v3 the `heap` parameter is non-const compared to v2.
995+ #[ cfg( feature = "v3" ) ]
996+ pub fn mi_heap_visit_blocks (
997+ heap : * mut mi_heap_t ,
998+ visit_all_blocks : bool ,
999+ visitor : mi_block_visit_fun ,
1000+ arg : * mut c_void ,
1001+ ) -> bool ;
9741002
9751003 #[ cfg( feature = "arena" ) ]
9761004 /// Create a heap that only allocates in the specified arena
0 commit comments