]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/ledger_create.html
xnu-792.6.76.tar.gz
[apple/xnu.git] / osfmk / man / ledger_create.html
CommitLineData
13fec989
A
1<h2>ledger_create</h2>
2<hr>
3<p>
4<strong>Function</strong> - Create a subordinate ledger.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t ledger_create</strong>
8 <strong>(ledger_port_t</strong> <var>parent_ledger</var>,
9 <strong>ledger_port_t</strong> <var>ledger_ledger</var>,
10 <strong>ledger_port_t</strong> <var>child_ledger</var>,
11 <strong>ledger_item_t</strong> <var>transfer</var><strong>);</strong>
12</pre>
13<h3>PARAMETERS</h3>
14<dl>
15<p>
16<dt> <var>parent_ledger</var>
17<dd>
18[in ledger send right]
19The parent ledger.
20<p>
21<dt> <var>ledger_ledger</var>
22<dd>
23[in ledger send right]
24The wired kernel memory ledger providing the
25space from which the ledger itself is drawn.
26<p>
27<dt> <var>child_ledger</var>
28<dd>
29[out ledger send right]
30The new child ledger, of the same resource type
31as the parent ledger.
32<p>
33<dt> <var>transfer</var>
34<dd>
35[in scalar]
36The resource amount to transfer to the new ledger.
37</dl>
38<h3>DESCRIPTION</h3>
39<p>
40The <strong>ledger_create</strong> function creates a subordinate ledger.
41Resource limits can be
42transferred from the parent ledger. The child ledger itself
43is accounted against
44the <var>ledger_ledger</var>. A new ledger inherits the remote service port.
45<h3>NOTES</h3>
46<p>
47This interface is not implemented in OSF/1 R1.3.
48<p>
49A ledger limit of <strong>LEDGER_ITEM_INFINITE</strong> allows any amount (even
50infinity) to be withdrawn. The root ledger has such a limit.
51<h3>RETURN VALUES</h3>
52<dl>
53<p>
54<dt> <strong>KERN_RESOURCE_SHORTAGE</strong>
55<dd>
56Transferring the resources would cause the parent ledger to exceed its
57limits.
58<p>
59<dt> <strong>KERN_INVALID_LEDGER</strong>
60<dd>
61<var>ledger_ledger</var> is not a wired kernel memory ledger.
62</dl>
63<h3>RELATED INFORMATION</h3>
64<p>
65Functions:
66<a href="ledger_transfer.html"><strong>ledger_transfer</strong></a>,
67<a href="ledger_terminate.html"><strong>ledger_terminate</strong></a>,
68<a href="ledger_read.html"><strong>ledger_read</strong></a>,
69<a href="ledger_set_remote.html"><strong>ledger_set_remote</strong></a>.