summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-11 05:28:16 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-11 05:28:16 +0000
commitc34fe8e00d5b049550f462155238d6e31e08b234 (patch)
tree52c438ba574ac64a151ec1aeba611f82b3873d9a /init
parent5d401f8369542fe3a8720b26cbf399c57e07e24b (diff)
1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
* init.c (frob_kernel_process): Use mmap instead of vm_allocate.
Diffstat (limited to 'init')
-rw-r--r--init/ChangeLog4
-rw-r--r--init/init.c9
2 files changed, 10 insertions, 3 deletions
diff --git a/init/ChangeLog b/init/ChangeLog
index b3e2dc50..87c7175a 100644
--- a/init/ChangeLog
+++ b/init/ChangeLog
@@ -2,6 +2,10 @@
* init.c: Add #include <sys/mman.h> for munmap decl.
+1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * init.c (frob_kernel_process): Use mmap instead of vm_allocate.
+
1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
* init.c (reboot_system): Use munmap instead of vm_deallocate.
diff --git a/init/init.c b/init/init.c
index ba2f9eec..9315a5bc 100644
--- a/init/init.c
+++ b/init/init.c
@@ -1007,9 +1007,12 @@ frob_kernel_process (void)
windowsz = round_page (((argc + 1) * sizeof (char *)) + argzlen);
- err = vm_allocate (mach_task_self (), &mine, windowsz, 1);
- assert_perror (err);
- err = vm_allocate (mach_task_self (), &his, windowsz, 1);
+ mine = (vm_address_t) mmap (0, windowsz, PROT_READ|PROT_WRITE,
+ MAP_ANON, 0, 0);
+ assert (mine != -1);
+ his = (vm_address_t) mmap (0, windowsz, PROT_READ|PROT_WRITE,
+ MAP_ANON, 0, 0);
+ assert (his != -1);
if (err)
{
error (0, err, "cannot allocate %Zu bytes in kernel task", windowsz);