Fix arena for mac

This commit is contained in:
Krzosa Karol
2024-01-08 06:55:22 +01:00
parent fb9cbdac3f
commit fbf32c2c59
2 changed files with 3 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ int CompileFiles(Strs files) {
result = OS_SystemF("g++ -o %Q.exe %Q -g -Wno-write-strings", exe, filestr); result = OS_SystemF("g++ -o %Q.exe %Q -g -Wno-write-strings", exe, filestr);
} }
else if (cc == "clang") { else if (cc == "clang") {
result = OS_SystemF("clang++ -o %Q.exe %Q -g -Wno-writable-strings", exe, filestr); result = OS_SystemF("clang++ -std=c++11 -o %Q.exe %Q -g -Wno-writable-strings", exe, filestr);
} }
else { else {
result = OS_SystemF("cl -Fe:%Q.exe %Q -Zi -WX -W3 -wd4200 -diagnostics:column -nologo -D_CRT_SECURE_NO_WARNINGS", exe, filestr); result = OS_SystemF("cl -Fe:%Q.exe %Q -Zi -WX -W3 -wd4200 -diagnostics:column -nologo -D_CRT_SECURE_NO_WARNINGS", exe, filestr);

View File

@@ -417,7 +417,7 @@ MA_API bool MV_DecommitPos(MV_Memory *m, size_t pos) {
return false; return false;
} }
#elif __unix__ // _WIN32 #else
#include <sys/mman.h> #include <sys/mman.h>
#define MV__UNIX_PAGE_SIZE 4096 #define MV__UNIX_PAGE_SIZE 4096
MA_API MV_Memory MV_Reserve(size_t size) { MA_API MV_Memory MV_Reserve(size_t size) {
@@ -448,6 +448,4 @@ MA_API void MV_Deallocate(MV_Memory *m) {
int result = munmap(m->data, m->reserve); int result = munmap(m->data, m->reserve);
MA_ASSERT(result == 0 && "Failed to release virtual memory using munmap"); MA_ASSERT(result == 0 && "Failed to release virtual memory using munmap");
} }
#else #endif
#error "unhandled arena platform"
#endif // __unix__