kmem_free(D3DK) —
NAME
kmem_free − free previously allocated kernel memory .IX \f4kmem_free\fP(D3DK)
SYNOPSIS
#include <sys/types.h>
#include <sys/kmem.h>
void kmem_free(void ∗addr, size_t size);
ARGUMENTS
addrAddress of the allocated memory to be returned. addr must specify the same address that was returned by the corresponding call to kmem_alloc(D3DK) or kmem_zalloc(D3DK) which allocated the memory.
sizeNumber of bytes to free. The size parameter must specify the same number of bytes as was allocated by the corresponding call to kmem_alloc or kmem_zalloc.
DESCRIPTION
kmem_free returns size bytes of previously allocated kernel memory. The addr and size arguments must specify exactly one complete area of memory that was allocated by a call to kmem_alloc or kmem_zalloc (that is, the memory cannot be freed piecemeal).
RETURN VALUE
None.
LEVEL
Base or Interrupt.
NOTES
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks may be held across calls to this function.
SEE ALSO
kmem_alloc(D3DK), kmem_zalloc(D3DK)
DDI/DKI