aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/core/function/SecureMemoryAllocator.cpp22
2 files changed, 21 insertions, 9 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b6702191..5496572c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -311,14 +311,6 @@ if (BUILD_APPLICATION)
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
if (MINGW)
add_executable(${AppName} WIN32 ${BASE_SOURCE} ${RESOURCE_FILES})
- # include qt dependencies
- if(NOT Qt6_DIR)
- add_custom_command(TARGET ${AppName} POST_BUILD
- COMMAND windeployqt --force --libdir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} --release ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${AppName}.exe)
- else()
- add_custom_command(TARGET ${AppName} POST_BUILD
- COMMAND windeployqt-qt6.exe --force --libdir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} --release ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${AppName}.exe)
- endif()
elseif (LINUX AND NOT LINUX_INSTALL_SOFTWARE)
add_executable(${AppName} ${BASE_SOURCE} ${RESOURCE_FILES})
diff --git a/src/core/function/SecureMemoryAllocator.cpp b/src/core/function/SecureMemoryAllocator.cpp
index f854f816..651e4085 100644
--- a/src/core/function/SecureMemoryAllocator.cpp
+++ b/src/core/function/SecureMemoryAllocator.cpp
@@ -28,6 +28,8 @@
#include "SecureMemoryAllocator.h"
+#ifndef MACOS
+
#include <mimalloc.h>
namespace GpgFrontend {
@@ -38,10 +40,28 @@ auto SecureMemoryAllocator::Allocate(std::size_t size) -> void* {
}
auto SecureMemoryAllocator::Reallocate(void* ptr, std::size_t size) -> void* {
- auto* addr = realloc(ptr, size);
+ auto* addr = mi_realloc(ptr, size);
return addr;
}
void SecureMemoryAllocator::Deallocate(void* p) { mi_free(p); }
+#else
+
+namespace GpgFrontend {
+
+auto SecureMemoryAllocator::Allocate(std::size_t size) -> void* {
+ auto* addr = malloc(size);
+ return addr;
+}
+
+auto SecureMemoryAllocator::Reallocate(void* ptr, std::size_t size) -> void* {
+ auto* addr = realloc(ptr, size);
+ return addr;
+}
+
+void SecureMemoryAllocator::Deallocate(void* p) { free(p); }
+
+#endif
+
} // namespace GpgFrontend \ No newline at end of file