diff --git a/CMakeLists.txt b/CMakeLists.txt index d51cf463..015545be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ ExternalProject_Add(googletest ExternalProject_Add(heap_layers GIT_REPOSITORY https://github.com/emeryberger/Heap-Layers.git - GIT_TAG a80041cc15174ab82a39bae1cd750b52955c7eef + GIT_TAG b0b2c2c7c5553b79c534f55317a5ab3e7d011379 SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/heap_layers-src" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/heap_layers-build" CONFIGURE_COMMAND "" diff --git a/WORKSPACE b/WORKSPACE index 6eea4954..5a4568af 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -10,7 +10,7 @@ commit = { "rules_cc": "aa7ff810cf5ec99ca34f784743b33631b74c2d16", "googletest": "aa533abfd4232b01f9e57041d70114d5a77e6de0", "benchmark": "bc5651e54a7e178ca6b1e27e469a9be19cfa62c4", # 1.5.4 - "heap_layers": "08ca96cfe11b1dd1c504fb7be613ad00756d568f", + "heap_layers": "b0b2c2c7c5553b79c534f55317a5ab3e7d011379", } http_archive( diff --git a/src/fbsd_wrapper.cc b/src/fbsd_wrapper.cc index f784630c..2e29cfd4 100644 --- a/src/fbsd_wrapper.cc +++ b/src/fbsd_wrapper.cc @@ -58,7 +58,7 @@ WEAK_REDEF1(void, free, void *); WEAK_REDEF1(void, cfree, void *); WEAK_REDEF2(void *, calloc, size_t, size_t); WEAK_REDEF2(void *, realloc, void *, size_t); -WEAK_REDEF2(void *, reallocarray, void *, size_t, size_t); +WEAK_REDEF3(void *, reallocarray, void *, size_t, size_t); WEAK_REDEF2(void *, memalign, size_t, size_t); WEAK_REDEF3(int, posix_memalign, void **, size_t, size_t); WEAK_REDEF2(void *, aligned_alloc, size_t, size_t); diff --git a/src/testing/unit/alignment.cc b/src/testing/unit/alignment.cc index ade55a18..0533116e 100644 --- a/src/testing/unit/alignment.cc +++ b/src/testing/unit/alignment.cc @@ -46,8 +46,8 @@ TEST(Alignment, NaturalAlignment) { TEST(Alignment, NonOverlapping) { auto heap = ThreadLocalHeap::GetHeap(); - const uintptr_t a = reinterpret_cast(heap->malloc(-8)); - const uintptr_t b = reinterpret_cast(heap->malloc(-8)); + const auto a = heap->malloc(-8); + const auto b = heap->malloc(-8); // we should return nullptr for crazy allocations like this. // Fixes #62 diff --git a/src/testing/unit/concurrent_mesh_test.cc b/src/testing/unit/concurrent_mesh_test.cc index 58c8e04e..7f868b19 100644 --- a/src/testing/unit/concurrent_mesh_test.cc +++ b/src/testing/unit/concurrent_mesh_test.cc @@ -32,7 +32,7 @@ static atomic ShouldContinueTest; // stop-the-world quiescent period for the copy/mremap phase of // meshing -- copied from libmesh.cc -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__FreeBSD__) #define PTHREAD_CREATE_THROW #else #define PTHREAD_CREATE_THROW throw() diff --git a/src/testing/unit/triple_mesh_test.cc b/src/testing/unit/triple_mesh_test.cc index 774ab915..c70bacd1 100644 --- a/src/testing/unit/triple_mesh_test.cc +++ b/src/testing/unit/triple_mesh_test.cc @@ -31,7 +31,7 @@ static atomic ShouldContinueTest1; static atomic ShouldExit2; static atomic ShouldContinueTest2; -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__FreeBSD__) #define PTHREAD_CREATE_THROW #else #define PTHREAD_CREATE_THROW throw()