memory_object_data_error.html   [plain text]

<strong>Function</strong> - An error prevents the supply of previously requested data.
<strong>kern_return_t   memory_object_data_error</strong>
                <strong>(memory_object_control_t</strong>         <var>memory_control</var>,
                 <strong>vm_offset_t</strong>                             <var>offset</var>,
                 <strong>vm_size_t</strong>                                 <var>size</var>,
                 <strong>kern_return_t</strong>                           <var>reason</var><strong>);</strong>
<dt> <var>memory_control</var> 
[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 <strong>memory_object_create</strong> call.
<dt> <var>offset</var> 
[in scalar]
The offset within the memory object, in bytes.
<dt> <var>size</var> 
[in scalar]
The number of bytes of data (starting at <var>offset</var>).  The number 
must convert to an integral number of memory object pages.
<dt> <var>reason</var> 
[in scalar]
Reason for the error.
The <strong>memory_object_data_error</strong> 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 <strong>memory_object_data_request</strong> call, the memory
manager can respond with a <strong>memory_object_data_error</strong>
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).
If reason has a system code of <var>err_kern</var>, the kernel will substitute
an error value 
of <strong>KERN_MEMORY_ERROR</strong>.
Only generic errors apply.
<a href="memory_object_data_request.html"><strong>memory_object_data_request</strong></a>,
<a href="memory_object_data_supply.html"><strong>memory_object_data_supply</strong></a>,
<a href="MO_data_unavailable.html"><strong>memory_object_data_unavailable</strong></a>.