Remove Mimalloc from Bin2CPP (#6)
All checks were successful
Bin2CPP / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 56s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 57s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 44s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 43s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Successful in 57s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Successful in 56s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 1m9s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 1m11s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 1m5s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 1m4s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Successful in 1m27s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Successful in 1m30s
Bin2CPP / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 1m1s
Bin2CPP / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 1m2s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Successful in 1m11s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Successful in 1m15s
Bin2CPP / Clang Format Checks (push) Successful in 9s
Conan Packaging / Package Bin2CPP/1.0.0 (push) Successful in 1m9s
Bin2CPP / Sonarqube (push) Successful in 1m40s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 54s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 54s
All checks were successful
Bin2CPP / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 56s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 57s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 44s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 43s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Successful in 57s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Successful in 56s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 1m9s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 1m11s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 1m5s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 1m4s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Successful in 1m27s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Successful in 1m30s
Bin2CPP / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 1m1s
Bin2CPP / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 1m2s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Successful in 1m11s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Successful in 1m15s
Bin2CPP / Clang Format Checks (push) Successful in 9s
Conan Packaging / Package Bin2CPP/1.0.0 (push) Successful in 1m9s
Bin2CPP / Sonarqube (push) Successful in 1m40s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 54s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 54s
Overkill for what we do Reviewed-on: #6
This commit was merged in pull request #6.
This commit is contained in:
@@ -35,7 +35,6 @@ target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
Bin2CPPCompileAndLinkFlags
|
||||
PUBLIC
|
||||
$<IF:$<BOOL:${ASAN}>,mimalloc-asan,mimalloc-static>
|
||||
quill::quill
|
||||
$<$<CONFIG:Debug,RelWithDebInfo>:cpptrace::cpptrace>
|
||||
magic_enum::magic_enum)
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
/*********************************************************************
|
||||
* \file MimallocImpl.cpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date February 2026
|
||||
*********************************************************************/
|
||||
#if defined BIN2CPP_WINDOWS
|
||||
#pragma comment(linker, "/include:mi_version")
|
||||
#pragma warning(disable: 4100 4559)
|
||||
#elif defined BIN2CPP_LINUX
|
||||
#if defined(__GNUC__) && !defined(__llvm__) && !defined(__INTEL_COMPILER)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#else
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Taken from mimalloc-new-delete.h
|
||||
|
||||
// clang-format off
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// This header provides convenient overrides for the new and
|
||||
// delete operations in C++.
|
||||
//
|
||||
// This header should be included in only one source file!
|
||||
//
|
||||
// On Windows, or when linking dynamically with mimalloc, these
|
||||
// can be more performant than the standard new-delete operations.
|
||||
// See <https://en.cppreference.com/w/cpp/memory/new/operator_new>
|
||||
// ---------------------------------------------------------------------------
|
||||
#if defined(__cplusplus)
|
||||
#include <new>
|
||||
#include <mimalloc.h>
|
||||
|
||||
#if defined(_MSC_VER) && defined(_Ret_notnull_) && defined(_Post_writable_byte_size_)
|
||||
// stay consistent with VCRT definitions
|
||||
#define mi_decl_new(n) mi_decl_nodiscard mi_decl_restrict _Ret_notnull_ _Post_writable_byte_size_(n)
|
||||
#define mi_decl_new_nothrow(n) mi_decl_nodiscard mi_decl_restrict _Ret_maybenull_ _Success_(return != NULL) _Post_writable_byte_size_(n)
|
||||
#else
|
||||
#define mi_decl_new(n) mi_decl_nodiscard mi_decl_restrict
|
||||
#define mi_decl_new_nothrow(n) mi_decl_nodiscard mi_decl_restrict
|
||||
#endif
|
||||
|
||||
void operator delete(void* p) noexcept { mi_free(p); };
|
||||
void operator delete[](void* p) noexcept { mi_free(p); };
|
||||
|
||||
void operator delete (void* p, const std::nothrow_t&) noexcept { mi_free(p); }
|
||||
void operator delete[](void* p, const std::nothrow_t&) noexcept { mi_free(p); }
|
||||
|
||||
mi_decl_new(n) void* operator new(std::size_t n) noexcept(false) { return mi_new(n); }
|
||||
mi_decl_new(n) void* operator new[](std::size_t n) noexcept(false) { return mi_new(n); }
|
||||
|
||||
mi_decl_new_nothrow(n) void* operator new (std::size_t n, const std::nothrow_t& tag) noexcept { (void)(tag); return mi_new_nothrow(n); }
|
||||
mi_decl_new_nothrow(n) void* operator new[](std::size_t n, const std::nothrow_t& tag) noexcept { (void)(tag); return mi_new_nothrow(n); }
|
||||
|
||||
// Not from mimalloc-new-delete.h, but necessary for EASTL
|
||||
void* operator new[](size_t size, const char* name, int flags, unsigned debugFlags, const char* file, int line) noexcept(false) { return mi_new(size); }
|
||||
|
||||
#if (__cplusplus >= 201402L || _MSC_VER >= 1916)
|
||||
void operator delete (void* p, std::size_t n) noexcept { mi_free_size(p,n); };
|
||||
void operator delete[](void* p, std::size_t n) noexcept { mi_free_size(p,n); };
|
||||
#endif
|
||||
|
||||
#if (__cplusplus > 201402L || defined(__cpp_aligned_new))
|
||||
void operator delete (void* p, std::align_val_t al) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }
|
||||
void operator delete[](void* p, std::align_val_t al) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }
|
||||
void operator delete (void* p, std::size_t n, std::align_val_t al) noexcept { mi_free_size_aligned(p, n, static_cast<size_t>(al)); };
|
||||
void operator delete[](void* p, std::size_t n, std::align_val_t al) noexcept { mi_free_size_aligned(p, n, static_cast<size_t>(al)); };
|
||||
void operator delete (void* p, std::align_val_t al, const std::nothrow_t&) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }
|
||||
void operator delete[](void* p, std::align_val_t al, const std::nothrow_t&) noexcept { mi_free_aligned(p, static_cast<size_t>(al)); }
|
||||
|
||||
void* operator new (std::size_t n, std::align_val_t al) noexcept(false) { return mi_new_aligned(n, static_cast<size_t>(al)); }
|
||||
void* operator new[](std::size_t n, std::align_val_t al) noexcept(false) { return mi_new_aligned(n, static_cast<size_t>(al)); }
|
||||
void* operator new (std::size_t n, std::align_val_t al, const std::nothrow_t&) noexcept { return mi_new_aligned_nothrow(n, static_cast<size_t>(al)); }
|
||||
void* operator new[](std::size_t n, std::align_val_t al, const std::nothrow_t&) noexcept { return mi_new_aligned_nothrow(n, static_cast<size_t>(al)); }
|
||||
|
||||
// Not from mimalloc-new-delete.h, but necessary for EASTL
|
||||
void* operator new[](size_t size, size_t alignment, size_t alignmentOffset, const char* pName, int flags, unsigned debugFlags, const char* file, int line) noexcept(false) { return mi_new_aligned(size, alignment); }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// clang-format on
|
||||
|
||||
#if defined BIN2CPP_WINDOWS
|
||||
#pragma warning(default: 4100 4559)
|
||||
#elif defined BIN2CPP_LINUX
|
||||
#if defined(__GNUC__) && !defined(__llvm__) && !defined(__INTEL_COMPILER)
|
||||
#pragma GCC diagnostic pop
|
||||
#else
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user