Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/audio/api-ref/ado_shm_alloc.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/audio/api-ref/ado_shm_alloc.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/audio/api-ref/ado_shm_alloc.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/audio/api-ref/ado_shm_alloc.html on line 8
Allocate shared memory
#include <audio_driver.h>
void *ado_shm_alloc( size_t size,
char *name,
int32_t flags,
off64_t *phys_addr );
- size
- The size of the block to allocate, in bytes.
- name
- The name of the shared region.
The storage requirements for name are defined as
QNX_SHM_NAME_LEN.
- flags
- Restrictions on the memory region; any combination of:
- ADO_SHM_DMA_SAFE — the region must be physical to
allow DMA operations.
- ADO_DMA_ISA — the region must begin on a
64-kilobyte boundary.
- ADO_DMA_16M — the region must be allocated within
the first 16M of memory.
- phys_addr
- A pointer to where ado_shm_alloc() should store the physical
address of the region.
The ado_shm_alloc() function allocates a block of
shared memory.
You use it mostly for the DMA buffer so that it can be shared.
The
ado_shm_mmap()
function is for cards where the DMA buffer is in onboard memory; it mmaps the
card memory and makes the region shared without allocating it.
A pointer to the allocated memory, or NULL if an error occurred
(errno
is set).
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
ado_shm_free(),
ado_shm_mmap()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ddk_en/audio/api-ref/ado_shm_alloc.html on line 142
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ddk_en/audio/api-ref/ado_shm_alloc.html on line 142