Skip to content

Commit

Permalink
Fix packaging & mac build
Browse files Browse the repository at this point in the history
  • Loading branch information
maximegmd committed Dec 22, 2020
1 parent c03e133 commit c6a5137
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Code/core/src/StandardAllocator.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#include "StandardAllocator.hpp"

#include <cstdlib>
#ifndef __APPLE__
#include <malloc/malloc.h>
#else
#include <malloc.h>
#endif

namespace TiltedPhoques
{
Expand All @@ -23,6 +27,8 @@ namespace TiltedPhoques
return _msize(apData);
#elif __linux__
return malloc_usable_size(apData);
#elif __APPLE__
return malloc_size(apData);
#else
static_assert(false, "Not implemented");
return 0;
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ target("TiltedCore")
set_kind("static")
add_files("Code/core/src/*.cpp")
add_includedirs("Code/core/include/", {public = true})
add_headerfiles("Core/core/include/*.hpp", {prefixdir = "TiltedCore"})
add_headerfiles("Code/core/include/*.hpp", {prefixdir = "TiltedCore"})
add_packages("mimalloc")

target("Tests")
Expand Down

0 comments on commit c6a5137

Please sign in to comment.