26 lines
390 B
C
26 lines
390 B
C
/* sys/mman.h: Memory allocation and deallocation. */
|
|
|
|
#ifndef _LUNA_MMAN_H
|
|
#define _LUNA_MMAN_H
|
|
|
|
#include <bits/mmap-flags.h>
|
|
#include <sys/types.h>
|
|
|
|
#define PAGE_SIZE 4096UL
|
|
|
|
#define MAP_FAILED (void*)-1
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
void* allocate_memory(size_t size, int flags);
|
|
int deallocate_memory(void* address, size_t size);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|