ledger_create


Function - Create a subordinate ledger.

SYNOPSIS

kern_return_t   ledger_create
                (ledger_port_t                    parent_ledger,
                 ledger_port_t                    ledger_ledger,
                 ledger_port_t                     child_ledger,
                 ledger_item_t                         transfer);

PARAMETERS

parent_ledger
[in ledger send right] The parent ledger.

ledger_ledger
[in ledger send right] The wired kernel memory ledger providing the space from which the ledger itself is drawn.

child_ledger
[out ledger send right] The new child ledger, of the same resource type as the parent ledger.

transfer
[in scalar] The resource amount to transfer to the new ledger.

DESCRIPTION

The ledger_create function creates a subordinate ledger. Resource limits can be transferred from the parent ledger. The child ledger itself is accounted against the ledger_ledger. A new ledger inherits the remote service port.

NOTES

This interface is not implemented in OSF/1 R1.3.

A ledger limit of LEDGER_ITEM_INFINITE allows any amount (even infinity) to be withdrawn. The root ledger has such a limit.

RETURN VALUES

KERN_RESOURCE_SHORTAGE
Transferring the resources would cause the parent ledger to exceed its limits.

KERN_INVALID_LEDGER
ledger_ledger is not a wired kernel memory ledger.

RELATED INFORMATION

Functions: ledger_transfer, ledger_terminate, ledger_read, ledger_set_remote.