From 5fabaea30d782260fb3c83317a6127eefde63bd0 Mon Sep 17 00:00:00 2001 From: Aliaksey Kandratsenka Date: Thu, 22 Feb 2024 18:12:42 -0500 Subject: [PATCH] link page_heap_test with entirety of tcmalloc_minimal This makes page_heap_test a bit more uniform with rest of things and prevents any future missing symbols issues. --- Makefile.am | 2 +- src/page_heap.h | 2 +- .../page_heap_test/page_heap_test.vcxproj | 18 ++++++++++++------ .../page_heap_test.vcxproj.filters | 18 ++++++++++++++++++ 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index b892fb5..a46467a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -334,7 +334,7 @@ pagemap_unittest_LDADD = libcommon.la libgtest.la # we have. TESTS += page_heap_test page_heap_test_SOURCES = src/tests/page_heap_test.cc \ - $(MINIMAL_MALLOC_SRC) + $(libtcmalloc_minimal_la_SOURCES) page_heap_test_CXXFLAGS = -DNO_HEAP_CHECK -DNO_TCMALLOC_SAMPLES $(AM_CXXFLAGS) page_heap_test_CPPFLAGS = $(gtest_CPPFLAGS) page_heap_test_LDADD = libcommon.la libgtest.la diff --git a/src/page_heap.h b/src/page_heap.h index 64d30a2..d0809d9 100644 --- a/src/page_heap.h +++ b/src/page_heap.h @@ -100,7 +100,7 @@ template <> class MapSelector<32> { // contiguous runs of pages (called a "span"). // ------------------------------------------------------------------------- -class PERFTOOLS_DLL_DECL PageHeap { +class PageHeap { public: PageHeap() : PageHeap(1) {} PageHeap(Length smallest_span_size); diff --git a/vsprojects/page_heap_test/page_heap_test.vcxproj b/vsprojects/page_heap_test/page_heap_test.vcxproj index d0be0a8..ca59e84 100644 --- a/vsprojects/page_heap_test/page_heap_test.vcxproj +++ b/vsprojects/page_heap_test/page_heap_test.vcxproj @@ -118,7 +118,7 @@ - PERFTOOLS_DLL_DECL=;_DEBUG;%(PreprocessorDefinitions) + NO_HEAP_CHECK;NO_TCMALLOC_SAMPLES;PERFTOOLS_DLL_DECL=;_DEBUG;%(PreprocessorDefinitions) Level3 true stdcpp17 @@ -129,7 +129,7 @@ - PERFTOOLS_DLL_DECL=;_DEBUG;%(PreprocessorDefinitions) + NO_HEAP_CHECK;NO_TCMALLOC_SAMPLES;PERFTOOLS_DLL_DECL=;_DEBUG;%(PreprocessorDefinitions) Level3 true stdcpp17 @@ -140,7 +140,7 @@ - PERFTOOLS_DLL_DECL=;%(PreprocessorDefinitions) + NO_HEAP_CHECK;NO_TCMALLOC_SAMPLES;PERFTOOLS_DLL_DECL=;%(PreprocessorDefinitions) Level3 false true @@ -154,7 +154,7 @@ - PERFTOOLS_DLL_DECL=;%(PreprocessorDefinitions) + NO_HEAP_CHECK;NO_TCMALLOC_SAMPLES;PERFTOOLS_DLL_DECL=;%(PreprocessorDefinitions) Level3 MultiThreaded false @@ -169,7 +169,7 @@ - PERFTOOLS_DLL_DECL=;%(PreprocessorDefinitions) + NO_HEAP_CHECK;NO_TCMALLOC_SAMPLES;PERFTOOLS_DLL_DECL=;%(PreprocessorDefinitions) Level3 false true @@ -183,7 +183,7 @@ - PERFTOOLS_DLL_DECL=;%(PreprocessorDefinitions) + NO_HEAP_CHECK;NO_TCMALLOC_SAMPLES;PERFTOOLS_DLL_DECL=;%(PreprocessorDefinitions) Level3 MultiThreaded false @@ -220,6 +220,12 @@ + + + + + + diff --git a/vsprojects/page_heap_test/page_heap_test.vcxproj.filters b/vsprojects/page_heap_test/page_heap_test.vcxproj.filters index 9741cb8..e0c8db0 100644 --- a/vsprojects/page_heap_test/page_heap_test.vcxproj.filters +++ b/vsprojects/page_heap_test/page_heap_test.vcxproj.filters @@ -80,6 +80,24 @@ Source Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + > + + Source Files + + + Source Files + Source Files