Back to Darwin Xnu

Memory Object Data Request

osfmk/man/memory_object_data_request.html

latest2.8 KB
Original Source

memory_object_data_request


Server Interface - Request that memory manager page-in specified data.

SYNOPSIS

**kern\_return\_t memory\_object\_data\_request**** (memory\_object\_t **memory\_object,** memory\_object\_control\_t **memory\_control,** vm\_offset\_t **offset,** vm\_size\_t **length,** vm\_prot\_t **desired\_access** ); ****kern\_return\_t seqnos\_memory\_object\_data\_request**** (memory\_object\_t **memory\_object,** mach\_port\_seqno\_t **seqno,** memory\_object\_control\_t **memory\_control,** vm\_offset\_t **offset,** vm\_size\_t **length,** vm\_prot\_t **desired\_access** );**

PARAMETERS

memory_object[in abstract-memory-object (receive) right] The abstract memory object port that represents the memory object data.

seqno[in scalar] The sequence number of this message relative to the abstract memory object port.

memory_control[in memory-cache-control send right] The memory cache control port to be used for a response by the memory manager. If the memory object has been supplied to more than one kernel, this parameter identifies the kernel that is making the call.

offset[in scalar] The offset within the memory object.

length[in scalar] The number of bytes requested, starting at offset. The number converts to an integral number of virtual pages.

desired_access[in scalar] The memory access modes to be allowed for the cached data. Possible values are obtained by or'ing together the following values:

VM_PROT_READ Allows read access.

VM_PROT_WRITE Allows write access.

VM_PROT_EXECUTE Allows execute access.

DESCRIPTION

A memory_object_data_request function is called as the result of a kernel message requesting data from the specified memory object, for at least the access specified.

The kernel issues this call after a cache miss (that is, a page fault for which the kernel does not have the data). The kernel requests only amounts of data that are multiples of the page size included in the memory_object_init or memory_object_create call.

The memory manager is expected to use memory_object_data_supply to return at least the specified data, with as much access as it can allow. If the memory manager cannot provide the data (for example, because of a hardware error), it can use the memory_object_data_error call. The memory manager can also use memory_object_data_unavailable to tell the kernel to supply zero-filled memory for the region.

RETURN VALUES

Only generic errors apply.

Functions: memory_object_data_error, memory_object_data_supply, memory_object_data_unavailable, memory_object_server, seqnos_memory_object_server.