getting a pager in user space
getting a pager in user space
- Subject: getting a pager in user space
- From: Mattias Holm <email@hidden>
- Date: Thu, 18 Jun 2009 12:56:17 +0200
Hi,
I am in the need of mmapping a file with a certain alignment. Since
mmap doesn't seem to support align restrictions, I have been playing
with the mach_vm_map instead.
That works fine for just mapping memory, but in order to connect the
mach_vm_map with a file, i need to figure out the which pager is
connected to a file descriptor.
I.e. I want to do something like:
int fd = open("some file", O_RDONLY);
vm_pager_t pager = get_pager_for_fd(fd);
mach_vm_map(mach_task_self(),
&addr, size, alignMask,
VM_FLAGS_ANYWHERE,
pager, 0,
FALSE,
VM_PROT_READ, VM_PROT_READ, VM_INHERIT_NONE);
Is this possible in user space at all?
/Mattias
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden