VM problem...
Pawel Jakub Dawidek
nick at garage.freebsd.pl
Mon Jul 21 12:16:07 PDT 2003
On Mon, Jul 21, 2003 at 12:03:59PM -0700, Matthew Dillon wrote:
+> Hmm. Is the VM object properly sized? Any attempt to fault-in data
+> beyond a VM object's EOF, regardless of how you set the map_entry
+> permissions, will seg fault or bus fault.
I'm allocationg memory with obreak() function (so vm_map_find() function
is used to find space). But if I try to allocate size (and size is small),
obreak() will allocate more memory.
end = vm->vm_daddr + ctob(vm->vm_dsize);
obreak(vm, end + size);
vm_map_protect(&vm->vm_map, end, end + size, VM_PROT_READ);
And vm_map_protect() will create new map entry (it should, right?)
with entry->start = end and entry->end = end + size.
But what happend with those entries when execve() is called?
Because process' map catched before execve() doesn't exists after
execve() is called. So maybe those entries (with VM_PROT_READ) are
reused somehow?
THANKS!
--
Pawel Jakub Dawidek pawel at dawidek.net
UNIX Systems Programmer/Administrator http://garage.freebsd.pl
Am I Evil? Yes, I Am! http://cerber.sourceforge.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 305 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20030721/3c722525/attachment.bin
More information about the freebsd-hackers
mailing list