xref: /xnu-8792.41.9/osfmk/man/memory_object_data_error.html (revision 5c2921b07a2480ab43ec66f5b9e41cb872bc554f)
1*5c2921b0SApple OSS Distributions<h2>memory_object_data_error</h2>
2*5c2921b0SApple OSS Distributions<hr>
3*5c2921b0SApple OSS Distributions<p>
4*5c2921b0SApple OSS Distributions<strong>Function</strong> - An error prevents the supply of previously requested data.
5*5c2921b0SApple OSS Distributions<h3>SYNOPSIS</h3>
6*5c2921b0SApple OSS Distributions<pre>
7*5c2921b0SApple OSS Distributions<strong>kern_return_t   memory_object_data_error</strong>
8*5c2921b0SApple OSS Distributions                <strong>(memory_object_control_t</strong>         <var>memory_control</var>,
9*5c2921b0SApple OSS Distributions                 <strong>vm_offset_t</strong>                             <var>offset</var>,
10*5c2921b0SApple OSS Distributions                 <strong>vm_size_t</strong>                                 <var>size</var>,
11*5c2921b0SApple OSS Distributions                 <strong>kern_return_t</strong>                           <var>reason</var><strong>);</strong>
12*5c2921b0SApple OSS Distributions</pre>
13*5c2921b0SApple OSS Distributions<h3>PARAMETERS</h3>
14*5c2921b0SApple OSS Distributions<dl>
15*5c2921b0SApple OSS Distributions<p>
16*5c2921b0SApple OSS Distributions<dt> <var>memory_control</var>
17*5c2921b0SApple OSS Distributions<dd>
18*5c2921b0SApple OSS Distributions[in memory-cache-control send right]
19*5c2921b0SApple OSS DistributionsThe memory cache control port
20*5c2921b0SApple OSS Distributionsto be used by the memory manager for cache management requests.
21*5c2921b0SApple OSS DistributionsThis port is provided by the kernel in a <strong>memory_object_create</strong> call.
22*5c2921b0SApple OSS Distributions<p>
23*5c2921b0SApple OSS Distributions<dt> <var>offset</var>
24*5c2921b0SApple OSS Distributions<dd>
25*5c2921b0SApple OSS Distributions[in scalar]
26*5c2921b0SApple OSS DistributionsThe offset within the memory object, in bytes.
27*5c2921b0SApple OSS Distributions<p>
28*5c2921b0SApple OSS Distributions<dt> <var>size</var>
29*5c2921b0SApple OSS Distributions<dd>
30*5c2921b0SApple OSS Distributions[in scalar]
31*5c2921b0SApple OSS DistributionsThe number of bytes of data (starting at <var>offset</var>).  The number
32*5c2921b0SApple OSS Distributionsmust convert to an integral number of memory object pages.
33*5c2921b0SApple OSS Distributions<p>
34*5c2921b0SApple OSS Distributions<dt> <var>reason</var>
35*5c2921b0SApple OSS Distributions<dd>
36*5c2921b0SApple OSS Distributions[in scalar]
37*5c2921b0SApple OSS DistributionsReason for the error.
38*5c2921b0SApple OSS Distributions</dl>
39*5c2921b0SApple OSS Distributions<h3>DESCRIPTION</h3>
40*5c2921b0SApple OSS Distributions<p>
41*5c2921b0SApple OSS DistributionsThe <strong>memory_object_data_error</strong> function indicates that
42*5c2921b0SApple OSS Distributionsthe memory manager
43*5c2921b0SApple OSS Distributionscannot provide the kernel with the data requested for the given region,
44*5c2921b0SApple OSS Distributionsspecifying a reason for the error.
45*5c2921b0SApple OSS Distributions<p>
46*5c2921b0SApple OSS DistributionsWhen the kernel issues a <strong>memory_object_data_request</strong> call, the memory
47*5c2921b0SApple OSS Distributionsmanager can respond with a <strong>memory_object_data_error</strong>
48*5c2921b0SApple OSS Distributionscall to indicate that the
49*5c2921b0SApple OSS Distributionspage cannot be retrieved, and that a memory failure exception should be raised
50*5c2921b0SApple OSS Distributionsin any client threads that are waiting for the page.  Clients
51*5c2921b0SApple OSS Distributionsare permitted to catch
52*5c2921b0SApple OSS Distributionsthese exceptions and retry their page faults.  As a result, this
53*5c2921b0SApple OSS Distributionscall can be used to
54*5c2921b0SApple OSS Distributionsreport transient errors as well as permanent ones.  A memory manager can use
55*5c2921b0SApple OSS Distributionsthis call for both hardware errors (for example, disk failures) and software
56*5c2921b0SApple OSS Distributionserrors (for example, accessing data that does not exist or is protected).
57*5c2921b0SApple OSS Distributions<h3>NOTES</h3>
58*5c2921b0SApple OSS Distributions<p>
59*5c2921b0SApple OSS DistributionsIf reason has a system code of <var>err_kern</var>, the kernel will substitute
60*5c2921b0SApple OSS Distributionsan error value
61*5c2921b0SApple OSS Distributionsof <strong>KERN_MEMORY_ERROR</strong>.
62*5c2921b0SApple OSS Distributions<h3>RETURN VALUES</h3>
63*5c2921b0SApple OSS Distributions<p>
64*5c2921b0SApple OSS DistributionsOnly generic errors apply.
65*5c2921b0SApple OSS Distributions<h3>RELATED INFORMATION</h3>
66*5c2921b0SApple OSS Distributions<p>
67*5c2921b0SApple OSS DistributionsFunctions:
68*5c2921b0SApple OSS Distributions<a href="memory_object_data_request.html"><strong>memory_object_data_request</strong></a>,
69*5c2921b0SApple OSS Distributions<a href="memory_object_data_supply.html"><strong>memory_object_data_supply</strong></a>,
70*5c2921b0SApple OSS Distributions<a href="MO_data_unavailable.html"><strong>memory_object_data_unavailable</strong></a>.
71