memory_object_data_return


Server Interface - Return memory object data to the appropriate memory manager.

SYNOPSIS

kern_return_t   memory_object_data_return
                (memory_object_t                  memory_object,
                 memory_object_control_t         memory_control,
                 vm_offset_t                             offset,
                 pointer_t                                 data,
                 boolean_t                                dirty,
                 boolean_t                          kernel_copy);


kern_return_t   seqnos_memory_object_data_return
                (memory_object_t                  memory_object,
                 mach_port_seqno_t                        seqno,
                 memory_object_control_t         memory_control,
                 vm_offset_t                             offset,
                 pointer_t                                 data,
                 boolean_t                                dirty,
                 boolean_t                          kernel_copy);

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.

data
[in pointer to dynamic array of bytes] The data that has been evicted from the physical memory cache.

dirty
[in scalar] If TRUE, the pages returned have been modified.

kernel_copy
[in scalar] If TRUE, the kernel has kept a copy of the page.

DESCRIPTION

A memory_object_data_return function is called as the result of a kernel message providing the memory manager with data that has been evicted from the physical memory cache.

The kernel writes back only data that has been modified or is precious. When the memory manager no longer needs the data (for example, after the data has been written to permanent storage), it should use vm_deallocate to release the memory resources.

NOTES

The kernel can flush clean (that is, un-modified) non-precious pages at its own discretion. As a result, the memory manager cannot rely on the kernel to keep a copy of its data or even to provide notification that its data has been discarded.

The kernel may re-request the returned data at any time following this message (including immediately).

RETURN VALUES

Only generic errors apply.

RELATED INFORMATION

Functions: memory_object_data_supply, vm_deallocate, memory_object_synchronize, memory_object_server, seqnos_memory_object_server.