File tree Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 4949 -DUMF_BUILD_BENCHMARKS=OFF
5050 -DUMF_BUILD_TESTS=ON
5151 -DUMF_FORMAT_CODE_STYLE=OFF
52- -DUMF_DEVELOPER_MODE=OFF
52+ -DUMF_DEVELOPER_MODE=ON
5353 -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
5454 -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
5555 -DUMF_TESTS_FAIL_ON_SKIP=ON
Original file line number Diff line number Diff line change @@ -111,6 +111,16 @@ else()
111111 message (FATAL_ERROR "Unknown OS type" )
112112endif ()
113113
114+ if ((DEFINED ENV{CI}) AND (DEFINED ENV{GITHUB_ACTION}))
115+ set (UMF_COMMON_COMPILE_DEFINITIONS ${UMF_COMMON_COMPILE_DEFINITIONS}
116+ UMF_CI_GITHUB_ACTION=1)
117+ endif ()
118+
119+ if (UMF_DEVELOPER_MODE)
120+ set (UMF_COMMON_COMPILE_DEFINITIONS ${UMF_COMMON_COMPILE_DEFINITIONS}
121+ UMF_DEVELOPER_MODE=1)
122+ endif ()
123+
114124if (NOT UMF_BUILD_LIBUMF_POOL_JEMALLOC)
115125 set (UMF_POOL_JEMALLOC_ENABLED FALSE )
116126 set (JEMALLOC_FOUND FALSE )
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ set(UMF_CUDA_INCLUDE_DIR
1414# Compile definitions for UMF library.
1515#
1616# TODO: Cleanup the compile definitions across all the CMake files
17- set (UMF_COMMON_COMPILE_DEFINITIONS UMF_VERSION=${UMF_VERSION} )
17+ set (UMF_COMMON_COMPILE_DEFINITIONS ${UMF_COMMON_COMPILE_DEFINITIONS}
18+ UMF_VERSION=${UMF_VERSION} )
1819
1920set (BA_SOURCES
2021 ${CMAKE_CURRENT_SOURCE_DIR} /base_alloc/base_alloc.c
Original file line number Diff line number Diff line change @@ -303,7 +303,15 @@ void umf_ba_destroy(umf_ba_pool_t *pool) {
303303#ifndef NDEBUG
304304 ba_debug_checks (pool );
305305 if (pool -> metadata .n_allocs ) {
306- LOG_ERR ("pool->metadata.n_allocs = %zu" , pool -> metadata .n_allocs );
306+ LOG_ERR ("number of base allocator memory leaks: %zu" ,
307+ pool -> metadata .n_allocs );
308+
309+ #ifdef UMF_DEVELOPER_MODE
310+ assert (0 );
311+ #endif /* UMF_DEVELOPER_MODE */
312+ #if defined(UMF_CI_GITHUB_ACTION ) && !defined(UMF_DEVELOPER_MODE )
313+ #error UMF_DEVELOPER_MODE is not defined !!!
314+ #endif /* defined(UMF_CI_GITHUB_ACTION) && !defined(UMF_DEVELOPER_MODE) */
307315 }
308316#endif /* NDEBUG */
309317
You can’t perform that action at this time.
0 commit comments