Arquivos
magenta/docs/objects/vm_object.md
T
George Kulakowski 7c642bcc6a [docs] Add objects.md and objects/foo.md pages
Change-Id: I95b6a42330f8b9d3711c5c894aeaf88a9256f2de
2017-04-12 19:01:31 +00:00

1.9 KiB

Virtual Memory Object

NAME

vm_object - Virtual memory containers

SYNOPSIS

A Virtual Memory Object (VMO) represents a contiguous region of virtual memory that may be mapped into multiple address spaces.

DESCRIPTION

VMOs are used in by the kernel and userspace to represent both paged and physical memory. They are the standard method of sharing memory between processes, as well as between the kernel and userspace.

VMOs are created with vmo_create and basic I/O can be performed on them with vmo_read and vmo_write. A VMO's size may be set using vmo_set_size. Conversely, vmo_get_size will retrieve a VMO's current size.

Pages are committed (allocated) for VMOs on demand through vmo_read, vmo_write, or by mapping the VMO using vmar_map. Pages can be commited and decommited from a VMO manually by calling vmo_op_range with the MX_VMO_OP_COMMIT and MX_VMO_OP_DECOMMIT operations, but this should be considered a low level operation. vmo_op_range can also be used for cache and locking operations against pages a VMO holds.

SYSCALLS