*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> dmedia/dmbufalloc (3d)              
Title
Content
Arch
Section
 

Contents


dmBuffer(3dm)							 dmBuffer(3dm)


NAME    [Toc]    [Back]

     dmBufferAllocate, dmBufferAllocateSize, dmBufferAttach, dmBufferFree,
     dmBufferGetAllocSize - allocate and free a	DMbuffer

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/dm_buffer.h>

     DMstatus dmBufferAllocate(DMbufferpool pool, DMbuffer *buffer);

     DMstatus dmBufferAllocateSize(DMbufferpool	pool, int size,	DMbuffer *buffer);

     DMstatus dmBufferAttach( DMbuffer *buffer);

     DMstatus dmBufferFree(DMbuffer buffer);

     int dmBufferGetAllocSize(DMbufferpool pool);

DESCRIPTION    [Toc]    [Back]

     dmBufferAllocate reserves a DMbuffer in the specified DMbufferpool.  The
     buffer handle is returned to the address specified	with buffer. The
     availability of buffers in	the pool is determined with select(2) (See
     dmBufferGetPoolFD(3dm) ).	If no buffers are available this call
     immediately returns with DM_FAILURE.  The buffer remains reserved until
     its handle	is passed to dmBufferFree(3dm).

     dmBufferAllocateSize is similar to	dmBufferAllocate except	that a buffer
     size may be specified which is different from the default size set	when
     the DMbufferpool was created.  This call can only be used on
     DMbufferpools created with	the DM_POOL_VARIABLE parameter set although
     dmBufferAllocate can be used on any pool regardless of this parameter
     (see dmBufferCreatePool(3dm) ).

     dmBufferAllocateSize returns DM_FAILURE if	called on a DMbufferpool that
     was created without the DM_POOL_VARIABLE parameter	set, if	no buffers are
     available,	or if not enough space remains in the pool to satisfy the size
     request.

     dmBufferAttach attaches a user to a buffer	that has already been
     allocated using dmBufferAllocate(3dm) A user attached to a	buffer must
     free the buffer ( dmBufferFree(3dm) ) when	it is no longer	needed.

     dmBufferFree indicates the	buffer is no longer being used by the caller
     and will eventually be freed.  Operations on buffer after this call are
     invalid and not defined.

     dmBufferGetAllocSize returns the size of the buffer allocated when	a
     dmBufferAllocate is called	on pool.

SEE ALSO    [Toc]    [Back]

      
      
     dmBufferCreatePool(3dm), dmBufferGetPoolState(3dm), dmICSend(3dm),
     dmGetError(3dm), vlDMBufferSend(3dm).


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
BN_new Tru64 Allocate and free BIGNUMs
RSA_free Tru64 Allocate and free RSA objects
RSA_new OpenBSD allocate and free RSA objects
BN_new OpenBSD allocate and free BIGNUMs
RSA_free OpenBSD allocate and free RSA objects
DH_free OpenBSD allocate and free DH objects
DH_new OpenBSD allocate and free DH objects
BN_new NetBSD allocate and free BIGNUMs
DH_new NetBSD allocate and free DH objects
DH_new Tru64 Allocate and free DH objects
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service