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