VM: full munmap
complete munmap implementation; single-page references made a general munmap() implementation possible to write cleanly. . memory: let the MIOCRAMSIZE ioctl set the imgrd device size (but only to 0) . let the ramdisk command set sizes to 0 . use this command to set /dev/imgrd to 0 after mounting /usr in /etc/rc, so the boot time ramdisk is freed (about 4MB currently)
This commit is contained in:
@@ -923,7 +923,6 @@
|
||||
#define writev _writev
|
||||
#define minix_mmap _minix_mmap
|
||||
#define minix_munmap _minix_munmap
|
||||
#define minix_munmap_text _minix_munmap_text
|
||||
#define vfork __vfork14
|
||||
#endif /* __minix */
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ __weak_alias(vm_getphys, _vm_getphys)
|
||||
__weak_alias(vm_getrefcount, _vm_getrefcount)
|
||||
__weak_alias(minix_mmap, _minix_mmap)
|
||||
__weak_alias(minix_munmap, _minix_munmap)
|
||||
__weak_alias(minix_munmap_text, _minix_munmap_text)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -65,16 +64,6 @@ int minix_munmap(void *addr, size_t len)
|
||||
}
|
||||
|
||||
|
||||
int minix_munmap_text(void *addr, size_t len)
|
||||
{
|
||||
message m;
|
||||
|
||||
m.VMUM_ADDR = addr;
|
||||
m.VMUM_LEN = len;
|
||||
|
||||
return _syscall(VM_PROC_NR, VM_MUNMAP_TEXT, &m);
|
||||
}
|
||||
|
||||
void *vm_remap(endpoint_t d,
|
||||
endpoint_t s,
|
||||
void *da,
|
||||
|
||||
Reference in New Issue
Block a user