Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mit-eddie!mintaka!yale!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!andrew.cmu.edu!+ From: Richard.Draves@CS.CMU.EDU Newsgroups: comp.os.mach Subject: Re: VM_ALLOCATE question. Message-ID: Date: 17 Jan 90 18:32:08 GMT References: <3611@hub.UUCP> Sender: rpd@M.GP.CS.CMU.EDU Distribution: usa Organization: Carnegie Mellon, Pittsburgh, PA Lines: 16 In-Reply-To: <3611@hub.UUCP> The first argument to the vm_allocate() kernel call should be a task port. task_self() returns the calling task's task port. For example, vm_address_t addr; kern_return_t kr; kr = vm_allocate(task_self(), &addr, vm_page_size, TRUE); if (kr != KERN_SUCCESS) whatever; allocates one page of memory somewhere in the calling task's address space. The kernel call implementation translates the task port into a VM map structure before the vm_allocate() function inside the kernel is called. Rich