:What are the backing objects of the stack and heap area of a process's
:address space? When are they created? I saw the code vm_map_insert(), but
:the object argument given is NULL.
:
:Thanks,
:
:-Zhihui

    The backing objects are OBJT_DEFAULT objects.  They are typically created
    when the system first needs to retrieve the map entry's object or needs to
    clip the map entry (for example, when extending the stack or
    [s]brk()ing), so as to reduce the number of actual VM objects created and
    to share the same VM object (with different offsets) whenever possible.
    If you look in vm/vm_map.c that is what all those NULL tests and calls
    to vm_object_allocate(OBJT_DEFAULT, ...) do.

    An OBJT_DEFAULT object is effectively a swap-backed object, just one
    that does not yet have any swap associated with it.  If/When the
    system decides it needs to swap it will convert OBJT_DEFAULT objects
    for the memory in question to OBJT_SWAP objects.  The two are really 
    almost the same type of VM object.  The type distinction is simply used
    to optimize performance.

    The main VM object types are:

        OBJT_PHYS       physically-backed, never swapped out.
        OBJT_DEFAULT    swap-backed with no swap yet assigned
        OBJT_SWAP       swap-backed
        OBJT_VNODE      vnode (e.g. file) backed object

                                        -Matt
                                        Matthew Dillon 
                                        <[EMAIL PROTECTED]>

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to