[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, Volume 1

d_free_dmamem Kernel Service

Purpose

Frees an area of memory.

Syntax

int d_free_dmamem(d_handle_t  device_handle, void * addr, size_t size)

Description

Exported, documented kernel service supported on PCI-based systems only. The d_free_dmamem kernel service frees the area of memory pointed to by the addr parameter. This area of memory must be allocated with the d_alloc_dmamem kernel service using the same device_handle, and the addr must be the address returned from the corresponding d_alloc_dmamem call. Also, the size must be the same size that was used on the corresponding d_alloc_dmamem call.

Notes:
  1. Any memory allocated in a prior d_alloc_dmamem call must be explicitly freed with a d_free_dmamem call.
  2. This service can be called from the process environment only.

Parameters

device_handle Indicates the dma handle.
size_t size Specifies size of area to free.
void * addr Specifies address of area to free.

Return Values

0 Indicates successful completion.
-1 Indicates underlying free service (xmfree or rmalloc) failed.

Related Information

The d_alloc_dmamem kernel service.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]