move prim files in subdirectories

This commit is contained in:
Daan Leijen 2023-03-16 17:47:00 -07:00
parent 2e85af5bb2
commit 8a1f6c82b2
4 changed files with 12 additions and 6 deletions

View File

@ -9,10 +9,10 @@ terms of the MIT license. A copy of the license can be found in the file
// depending on the OS.
#if defined(_WIN32)
#include "prim-windows.c" // VirtualAlloc (Windows)
#include "windows/prim.c" // VirtualAlloc (Windows)
#elif defined(__wasi__)
#define MI_USE_SBRK
#include "prim-wasi.h" // memory-grow or sbrk (Wasm)
#include "wasi/prim.h" // memory-grow or sbrk (Wasm)
#else
#include "prim-unix.c" // mmap() (Linux, macOSX, BSD, Illumnos, Haiku, DragonFly, etc.)
#include "unix/prim.c" // mmap() (Linux, macOSX, BSD, Illumnos, Haiku, DragonFly, etc.)
#endif

View File

@ -5,6 +5,8 @@ terms of the MIT license. A copy of the license can be found in the file
"LICENSE" at the root of this distribution.
-----------------------------------------------------------------------------*/
// This file is included in `src/prim/prim.c`
#ifndef _DEFAULT_SOURCE
#define _DEFAULT_SOURCE // ensure mmap flags and syscall are defined
#endif
@ -21,7 +23,7 @@ terms of the MIT license. A copy of the license can be found in the file
#include "mimalloc.h"
#include "mimalloc-internal.h"
#include "mimalloc-atomic.h"
#include "prim.h"
#include "../prim.h"
#include <sys/mman.h> // mmap
#include <unistd.h> // sysconf

View File

@ -5,10 +5,12 @@ terms of the MIT license. A copy of the license can be found in the file
"LICENSE" at the root of this distribution.
-----------------------------------------------------------------------------*/
// This file is included in `src/prim/prim.c`
#include "mimalloc.h"
#include "mimalloc-internal.h"
#include "mimalloc-atomic.h"
#include "prim.h"
#include "../prim.h"
//---------------------------------------------
// Initialize

View File

@ -5,10 +5,12 @@ terms of the MIT license. A copy of the license can be found in the file
"LICENSE" at the root of this distribution.
-----------------------------------------------------------------------------*/
// This file is included in `src/prim/prim.c`
#include "mimalloc.h"
#include "mimalloc-internal.h"
#include "mimalloc-atomic.h"
#include "prim.h"
#include "../prim.h"
#include <string.h> // strerror
#include <stdio.h> // fputs, stderr