diff options
| author | Martin Ridgers <[email protected]> | 2021-12-02 08:50:47 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-12-02 11:36:19 +0100 |
| commit | 65bc9dbfcd8b67ef70bf1e04a7bba8742fa295c6 (patch) | |
| tree | 76f54ec033eac089db403ad3644d3bdae3f1b6ab | |
| parent | Moved "using namespace fmt::literals" out of file level scope (diff) | |
| download | zen-65bc9dbfcd8b67ef70bf1e04a7bba8742fa295c6.tar.xz zen-65bc9dbfcd8b67ef70bf1e04a7bba8742fa295c6.zip | |
Use zen::Memory::Alloc/Free instead of unportable _aligned_*
| -rw-r--r-- | zen/internalfile.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zen/internalfile.cpp b/zen/internalfile.cpp index d1314a75e..1eab04486 100644 --- a/zen/internalfile.cpp +++ b/zen/internalfile.cpp @@ -5,6 +5,7 @@ #include <zencore/filesystem.h> #include <zencore/fmtutils.h> #include <zencore/logging.h> +#include <zencore/memory.h> #include <gsl/gsl-lite.hpp> @@ -129,7 +130,7 @@ InternalFile::InternalFile() InternalFile::~InternalFile() { if (m_Memory) - _aligned_free(m_Memory); + zen::Memory::Free(m_Memory); } size_t @@ -181,7 +182,7 @@ InternalFile::MemoryMapFile() return m_Mmap.GetData(); } - m_Memory = _aligned_malloc(FileSize, 64); + m_Memory = zen::Memory::Alloc(FileSize, 64); Read(m_Memory, FileSize, 0); return m_Memory; |