SVR5
kmem_free(D3)
kmem_free --
free previously allocated kernel memory
Synopsis
#include <sys/types.h>
#include <sys/kmem.h>
#include <sys/ddi.h>
void kmem_free(void *addr, size_t size);
Description
kmem_free returns to the kernel allocator
size bytes of kernel memory previously allocated by
kmem_alloc(D3),
kmem_zalloc(D3),
kmem_alloc_phys(D3),
kmem_alloc_physreq(D3),
or
kmem_zalloc_physreq(D3),
Arguments
addr-
Address of the allocated memory to be returned.
This must specify the same address that was
returned by the corresponding allocation function.
size-
Number of bytes to free.
This must specify the same number of bytes as
was allocated by the corresponding call to
an allocation function.
Together, the addr and size arguments
must specify exactly one complete area
of memory that was allocated by the allocating function.
In other words,
the memory cannot be freed piecemeal.
Return values
None
Usage
Context and synchronization
All
contexts.
Hardware applicability
All
Version applicability
ddi:
1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
Differences between versions
In DDI 5 amd 5mp, memory allocated by
kmem_alloc_physcontig(D3)
must be free by
kmem_free_physcontig(D3).
References
kmem_alloc(D3),
kmem_alloc_phys(D3),
kmem_alloc_physreq(D3),
kmem_zalloc_physreq(D3),
kmem_alloc_physcontig(D3),
kmem_free_physcontig(D3),
kmem_zalloc(D3)
``Memory allocation'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005