Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ endif()
# set language for source files now
if(MI_USE_CXX)
set_source_files_properties(${mi_sources} PROPERTIES LANGUAGE CXX )
set_source_files_properties(test/test-diagnostic-walks.c test/test-snapshot-walk.c test/test-fork-locks.c PROPERTIES LANGUAGE CXX)
set_source_files_properties(test/test-diagnostic-walks.c test/test-snapshot-walk.c PROPERTIES LANGUAGE CXX)
# #272 (P7b): test-purge-holes.c and test-profile-race.c reach `mimalloc/internal.h`
# (`_mi_ptr_page`, `mi_page_block_is_purged`, `_mi_os_page_size`, ...), which is NOT wrapped
# in `extern "C"`. With MI_USE_CXX the library's symbols are C++-mangled, so a C test cannot
Expand Down
9 changes: 8 additions & 1 deletion include/mimalloc/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,18 @@ void _mi_fork_lock_order_observe(const mi_lock_t* lock);
// #270: test-only hooks (test/test-fork-locks.c) that let a test GUARANTEE the main
// subprocess's `heaps_lock` is held -- and the list it guards visibly poisoned -- at the
// moment of fork(), instead of relying on a probabilistic race. See fork.c's
// "MI_DEBUG-only test hooks" section.
// "MI_DEBUG-only test hooks" section. C linkage, so a C test links them even when the
// library is compiled as C++ (#619).
#ifdef __cplusplus
extern "C" {
#endif
void _mi_test_hold_heaps_lock(void);
bool _mi_test_heaps_lock_is_held(void);
void _mi_test_release_heaps_lock(void);
bool _mi_test_heaps_lock_poison_observed(void);
#ifdef __cplusplus
}
#endif
#endif

void* _mi_meta_zalloc( mi_subproc_t* subproc, size_t size, mi_memid_t* memid );
Expand Down
11 changes: 9 additions & 2 deletions rust/mimalloc-pprof/vendor/mimalloc-pprof-amalgamated.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* GENERATED FILE -- DO NOT EDIT. Produced by rust/xtask from commit 322fd835 of src/static.c. Regenerate with: cargo run -p xtask -- amalgamate-c */
/* GENERATED FILE -- DO NOT EDIT. Produced by rust/xtask from commit eea88676 of src/static.c. Regenerate with: cargo run -p xtask -- amalgamate-c */

/* ---- begin inlined: src/static.c ---- */
/* ----------------------------------------------------------------------------
Expand Down Expand Up @@ -4943,11 +4943,18 @@ void _mi_fork_lock_order_observe(const mi_lock_t* lock);
// #270: test-only hooks (test/test-fork-locks.c) that let a test GUARANTEE the main
// subprocess's `heaps_lock` is held -- and the list it guards visibly poisoned -- at the
// moment of fork(), instead of relying on a probabilistic race. See fork.c's
// "MI_DEBUG-only test hooks" section.
// "MI_DEBUG-only test hooks" section. C linkage, so a C test links them even when the
// library is compiled as C++ (#619).
#ifdef __cplusplus
extern "C" {
#endif
void _mi_test_hold_heaps_lock(void);
bool _mi_test_heaps_lock_is_held(void);
void _mi_test_release_heaps_lock(void);
bool _mi_test_heaps_lock_poison_observed(void);
#ifdef __cplusplus
}
#endif
#endif

void* _mi_meta_zalloc( mi_subproc_t* subproc, size_t size, mi_memid_t* memid );
Expand Down
Loading