Print this page
code review from Josh and Robert

*** 36,46 **** The allocation policy may be specified by one of the following flags: VM_BESTFIT Take the segment from the smallest free segment that ! could satisfy this allocation VM_FIRSTFIT Take the segment from the first free segment found that could satisfy this allocation. --- 36,46 ---- The allocation policy may be specified by one of the following flags: VM_BESTFIT Take the segment from the smallest free segment that ! could satisfy this allocation. VM_FIRSTFIT Take the segment from the first free segment found that could satisfy this allocation.
*** 53,67 **** VM_ENDALLOC May be specified in combination with VM_BESTFIT, VM_FIRSTFIT or the default policy to indicate that the higher addresses should be preferred. ! The default (un-named) allocation policy is ``instant fit'' an approximation of VM_BESTFIT in guaranteed constant time. align_arg ! The minimum alignment of the allocation. If `0' the allocated segment will be aligned as the arena's quantum. phase The allocated segment must be phase bytes from the alignment boundary. --- 53,67 ---- VM_ENDALLOC May be specified in combination with VM_BESTFIT, VM_FIRSTFIT or the default policy to indicate that the higher addresses should be preferred. ! The default (unnamed) allocation policy is ``instant fit'', an approximation of VM_BESTFIT in guaranteed constant time. align_arg ! The minimum alignment of the allocation. If 0, the allocated segment will be aligned as the arena's quantum. phase The allocated segment must be phase bytes from the alignment boundary.
*** 80,91 **** DESCRIPTION The vmem_alloc() and vmem_xalloc() functions allocate a segment of size length from the vmem arena vmp. ! The vmflag argument controls the behaviour of the allocation. As ! described in PARAMETERS For allocations with complex requirements, such as those used for DMA vmem_xalloc() takes additional arguments allowing those requirements to be expressed. --- 80,91 ---- DESCRIPTION The vmem_alloc() and vmem_xalloc() functions allocate a segment of size length from the vmem arena vmp. ! The vmflag argument controls the behaviour of the allocation, as ! described in PARAMETERS. For allocations with complex requirements, such as those used for DMA vmem_xalloc() takes additional arguments allowing those requirements to be expressed.
*** 105,112 **** On failure, NULL is returned. When the VM_SLEEP flag is specified, these functions can never fail (but may block forever). SEE ALSO ! vmem(9), vmem_create(9F) illumos January 18, 2017 illumos --- 105,112 ---- On failure, NULL is returned. When the VM_SLEEP flag is specified, these functions can never fail (but may block forever). SEE ALSO ! vmem(9), vmem_contains(9F), vmem_create(9F) illumos January 18, 2017 illumos