|
XenevaOS
|
#include <stdint.h>#include <string.h>#include <Mm/vmmngr.h>#include <Mm/pmmngr.h>#include <Mm/kmalloc.h>#include <process.h>

Go to the source code of this file.
Macros | |
| #define | MAP_ANONYMOUS 0 |
| #define | MAP_PRIVATE 0 |
| #define | MAP_FAILED ((void*)-1) |
| #define | PROT_READ 0 |
| #define | PROT_WRITE 0 |
| #define | O_RDWR 0 |
Functions | |
| void | SharedMemMapListInitialise () |
| SharedMemMapListInitialise – initialise the shared memory map list. | |
| void * | CreateMemMapping (void *address, size_t len, int prot, int flags, int fd, uint64_t offset) |
| CreateMemMapping – Create a memory mapping of just memory, file or device. | |
| void | MemMapDirty (void *startingVaddr, size_t len, int flags, int prot) |
| MemMapDirty – dirty update previously allocated memory map. | |
| void | UnmapMemMapping (void *address, size_t len) |
| UnmapMemMapping – unmaps a memory mapping. | |
BSD 2-Clause License
Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| #define MAP_ANONYMOUS 0 |
| #define MAP_FAILED ((void*)-1) |
| #define MAP_PRIVATE 0 |
| #define O_RDWR 0 |
| #define PROT_READ 0 |
| #define PROT_WRITE 0 |
|
extern |
CreateMemMapping – Create a memory mapping of just memory, file or device.
| address | – address from where mapping start, if null, kernel will find by its own |
| len | – length of the address |
| prot | – protection flags |
| flags | – flags |
| fd | – file descriptor, -1 for no file descriptor |
| offset | – byte offset for file and device |
|
extern |
MemMapDirty – dirty update previously allocated memory map.
| startingVaddr | – starting address |
| len | – length in bytes |
| flags | – memory map flags |
| prot | – protection flags |
|
extern |
SharedMemMapListInitialise – initialise the shared memory map list.
|
extern |
UnmapMemMapping – unmaps a memory mapping.
| address | – address from where mapping starts |
| len | – length of the mapping |