summaryrefslogtreecommitdiff
path: root/init/init.c
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/init.c
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/init.c')
-rw-r--r--init/init.c9
1 files changed, 6 insertions, 3 deletions
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);