mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 03:38:31 +00:00
Add MapViewOfFile3 WIN32 API
This commit is contained in:
parent
130fd66f9e
commit
d5ebb1fa5b
5 changed files with 70 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_MEMORY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_MEMORY_H_
|
||||
#include "libc/nt/struct/memextendedparameter.h"
|
||||
#include "libc/nt/struct/memorybasicinformation.h"
|
||||
#include "libc/nt/struct/memoryrangeentry.h"
|
||||
#include "libc/nt/struct/securityattributes.h"
|
||||
|
@ -82,6 +83,19 @@ void *HeapReAlloc(int64_t hHeap, uint32_t dwFlags, void *lpMem,
|
|||
void *GlobalAlloc(uint32_t uFlags, uint64_t dwBytes) __wur;
|
||||
void *GlobalFree(void *hMem);
|
||||
|
||||
/**
|
||||
* @param AllocationType
|
||||
* - kNtMemReserve
|
||||
* - kNtMemReplacePlaceholder
|
||||
* - kNtMemLargePages
|
||||
*/
|
||||
void *MapViewOfFile3(
|
||||
intptr_t FileMapping, intptr_t Process, void *opt_BaseAddress,
|
||||
uint64_t Offset, size_t ViewSize, unsigned AllocationType,
|
||||
unsigned PageProtection,
|
||||
struct NtMemExtendedParameter *in_out_opt_ExtendedParameters,
|
||||
unsigned ParameterCount);
|
||||
|
||||
#if ShouldUseMsabiAttribute()
|
||||
#include "libc/nt/thunk/memory.inc"
|
||||
#endif /* ShouldUseMsabiAttribute() */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue