## memory_object_supply_completed

Server Interface - Return results associated with the kernel's handling of a particular memory manager request.

### SYNOPSIS

    kern_return_t   memory_object_supply_completed
                    (memory_object_t                     reply_port,
                     memory_object_control_t         memory_control,
                     vm_offset_t                             offset,
                     vm_size_t                               length,
                     kern_return_t                           result,
                     vm_offset_t                       error_offset);

    kern_return_t   seqnos_memory_object_supply_completed
                    (memory_object_t                     reply_port,
                     mach_port_seqno_t                        seqno,
                     memory_object_control_t         memory_control,
                     vm_offset_t                             offset,
                     vm_size_t                               length,
                     kern_return_t                           result,
                     vm_offset_t                       error_offset);

### PARAMETERS

reply_port
  [in reply (receive) right] The port supplied in the corresponding memory_object_data_supply call.

seqno
  [in scalar] The sequence number of this message relative to the port named in the memory_object_data_supply call.

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 from the corresponding data supply call.

length
  [in scalar] The number of bytes accepted. The number converts to an integral number of memory object pages.

result
  [in scalar] A kernel return code indicating the result of the supply operation, possibly KERN_SUCCESS. KERN_MEMORY_PRESENT is currently the only error returned; other errors (invalid arguments, for example) abort the data supply operation.

error_offset
  [in scalar] The offset within the memory object where the first error occurred.

### DESCRIPTION

A memory_object_supply_completed function is called as the result of a kernel message confirming the kernel's action in response to a memory_object_data_supply call from the memory manager.

When the kernel accepts the pages, it calls memory_object_supply_completed (asynchronously) using the port explicitly provided in the memory_object_data_supply call. Because the data supply call can provide multiple pages, not all of which the kernel may necessarily accept and some of which the kernel may have to return to the manager (if precious), the kernel provides this response. If the kernel does not accept all of the pages in the data supply message, it will indicate so in the completion response. If the pages not accepted are precious, they will be returned (in memory_object_data_return messages) before it sends this completion message. The completion call includes the offset and length values from the supply request to distinguish it from other supply requests.

### RETURN VALUES

Only generic errors apply.

### RELATED INFORMATION

Functions: memory_object_data_supply, memory_object_server, seqnos_memory_object_server.