|
Functions | |
| static dma_addr_t | dma_alloc (size_t size) |
| Allocate an object from the generic DMA pools. | |
| static void | dma_free (dma_addr_t obj, size_t size) |
| Free an object to the generic DMA pools. | |
The Generic DMA pool allocator allows DMA objects to be allocated without setting up a dedicated pool for them. When enabled, the generic DMA pool allocator will set up two "generic" pools: One for large objects and one for small objects. The application may specify the number and size of these objects by providing the following definitions in the configuration makefile:
Based on the requested size, the smallest pool which is large enough to satisfy the allocation is selected automatically. If the application doesn't provide any of the above definitions for one of the pools, that pool will be unavailable and all allocations will be made from the other pool.
The memory returned by the generic DMA pool allocator is coherent, so there's no need to perform any cache synchronization.
| static dma_addr_t dma_alloc | ( | size_t | size | ) | [inline, static] |
Allocate an object from the generic DMA pools.
This function picks the smallest generic DMA pool which can hold objects of size greater than or equal to size and allocates an object from it.
| size | Minimum size of the object to allocate |
Definition at line 176 of file dmapool.h.
References is_constant.
| static void dma_free | ( | dma_addr_t | obj, | |
| size_t | size | |||
| ) | [inline, static] |
Free an object to the generic DMA pools.
This function picks the same generic DMA pool picked based on size, and frees the object to it.
| obj | The object to be freed. | |
| size | The minimum size of the object. Must be the same value as was passed to dma_alloc() when this object was returned. |
Definition at line 205 of file dmapool.h.
References is_constant.
1.6.3