Added more Heap allocator stub functions.
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled

Moved platform api includes into mimir_impl.h
This commit is contained in:
2026-08-15 15:25:50 -07:00
parent d2582025dc
commit 3a6711a942
6 changed files with 42 additions and 35 deletions

View File

@@ -32,19 +32,6 @@
#include "../include/mimir.h"
#include "mimir_impl.h"
#if defined(__unix__) || defined(__APPLE__) || defined(ANDROID)
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#endif
#if defined(_WIN32) || defined(_WIN64)
#include <Windows.h>
#include <memoryapi.h>
#endif
#include <errno.h>
#include <cassert>
#include <cstring>
#include <bit>

View File

@@ -32,14 +32,6 @@
#include "../include/mimir.h"
#include "mimir_impl.h"
#if defined(__unix__) || defined(__APPLE__) || defined(ANDROID)
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#endif
#include <errno.h>
#include <cassert>
#include <cstring>

View File

@@ -32,19 +32,6 @@
#include "../include/mimir.h"
#include "mimir_impl.h"
#if defined(__unix__) || defined(__APPLE__) || defined(ANDROID)
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#endif
#if defined(_WIN32) || defined(_WIN64)
#include <Windows.h>
#include <memoryapi.h>
#endif
#include <errno.h>
#include <cassert>
#include <cstring>
#include <bit>
@@ -59,4 +46,27 @@ Heap::~Heap()
{
}
bool Heap::init(size_t minSize, size_t maxSize)
{
return false; // not implemented
}
// Allocate `size` bytes
std::byte* Heap::alloc(size_t size)
{
return nullptr; // not implemented
}
// Allocate `size` bytes, aligned to 16 bytes and padded to next 16-byte offset.
std::byte* Heap::allocA16(size_t size)
{
return nullptr; // not implemented
}
// Allocate `size` bytes, aligned to 64 bytes and padded to next 64-byte offset.
std::byte* Heap::allocA64(size_t size)
{
return nullptr; // not implemented
}
} // namespace mimir

View File

@@ -39,7 +39,6 @@
#include <fcntl.h>
#endif
#include <errno.h>
#include <cassert>
#include <cstring>

View File

@@ -31,8 +31,16 @@
#pragma once
#if defined(__unix__) || defined(__APPLE__) || defined(ANDROID)
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#endif
#if defined(_WIN32) || defined(_WIN64)
#include <Windows.h>
#include <memoryapi.h>
#endif
namespace mimir {