## memory_object_data_error

Function - An error prevents the supply of previously requested data.

### SYNOPSIS

    kern_return_t   memory_object_data_error
                    (memory_object_control_t         memory_control,
                     vm_offset_t                             offset,
                     vm_size_t                                 size,
                     kern_return_t                           reason);

### PARAMETERS

memory_control
  [in memory-cache-control send right] The memory cache control port to be used by the memory manager for cache management requests. This port is provided by the kernel in a memory_object_create call.

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

size
  [in scalar] The number of bytes of data (starting at offset). The number must convert to an integral number of memory object pages.

reason
  [in scalar] Reason for the error.

### DESCRIPTION

The memory_object_data_error function indicates that the memory manager cannot provide the kernel with the data requested for the given region, specifying a reason for the error.

When the kernel issues a memory_object_data_request call, the memory manager can respond with a memory_object_data_error call to indicate that the page cannot be retrieved, and that a memory failure exception should be raised in any client threads that are waiting for the page. Clients are permitted to catch these exceptions and retry their page faults. As a result, this call can be used to report transient errors as well as permanent ones. A memory manager can use this call for both hardware errors (for example, disk failures) and software errors (for example, accessing data that does not exist or is protected).

### NOTES

If reason has a system code of err_kern, the kernel will substitute an error value of KERN_MEMORY_ERROR.

### RETURN VALUES

Only generic errors apply.

### RELATED INFORMATION

Functions: memory_object_data_request, memory_object_data_supply, memory_object_data_unavailable.