Kernel/LibC: add mmap for private anonymous mappings
This will be used by the userspace to get more memory. Currently kernel handles all allocations, which is not preferable.
This commit is contained in:
@@ -46,6 +46,16 @@ struct posix_typed_mem_info
|
||||
size_t posix_tmi_length; /* Maximum length which may be allocated from a typed memory object. */
|
||||
};
|
||||
|
||||
struct sys_mmap_t
|
||||
{
|
||||
void* addr;
|
||||
size_t len;
|
||||
int prot;
|
||||
int flags;
|
||||
int fildes;
|
||||
off_t off;
|
||||
};
|
||||
|
||||
int mlock(const void* addr, size_t len);
|
||||
int mlockall(int flags);
|
||||
void* mmap(void* addr, size_t len, int prot, int flags, int fildes, off_t off);
|
||||
|
||||
@@ -55,6 +55,8 @@ __BEGIN_DECLS
|
||||
#define SYS_FSTATAT 48
|
||||
#define SYS_STAT 49 // stat/lstat
|
||||
#define SYS_SYNC 50
|
||||
#define SYS_MMAP 51
|
||||
#define SYS_MUNMAP 52
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user