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

  man pages->IRIX man pages -> midi/mdFree (3d)              
Title
Content
Arch
Section
 

Contents


mdMalloc(3dm)							 mdMalloc(3dm)


NAME    [Toc]    [Back]

     mdMalloc, mdFree, mdCallMalloc, mdCallFree, mdSetAllocator	- control
     memory allocation for the MIDI library

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/midi.h>

     typedef void *(*mdMalloc_t)(size_t);

     typedef void (*mdFree_t)(void *);

     mdMalloc_t	mdMalloc;

     mdFree_t mdFree;

     mdCallMalloc(size_t len);

     mdCallFree(void *arg);

     void mdSetAllocator(mdMalloc_t malloc_func, mdFree_t free_func, void *ap)

DESCRIPTION    [Toc]    [Back]

     mdMalloc and mdFree are pointers to memory	allocation functions used by
     the MIDI library.	The default implementations use	the amalloc(3P)
     library to	implement an arena separate from the main heap used by
     malloc(3C).  This allows memory performance in the	MIDI library to	be
     maintained	in the presence	of high	malloc usage by	an application.
     mdMalloc is used by mdReceive(3dm)	to allocate storage for	incoming MIDI
     system exclusive messages.	 mdFree	is used	by the application to release
     that storage.

     mdMalloc and mdFree are mp-safe.

     mdSetAllocator allows an application to override the any of the
     following:	mdMalloc (via malloc_func), mdFree (via	free_func) or the
     storage arena (via	ap).  When using one's own arena, the default behavior
     of	the storage allocator may be changed via amallopt(3P).	If all three
     are overridden, the behavior of the storage allocator is completely under
     application control.

     mdCallMalloc and mdCallFree are routines used to call the current
     allocation	or deallocation	routine, respectively.	These are actual
     routines, not pointers.

RETURN VALUE    [Toc]    [Back]

     mdMalloc returns a	pointer	to a block of memory at	least len bytes	long,
     or	NULL if	no storage can be allocated.

SEE ALSO    [Toc]    [Back]

      
      
     mdIntro(3dm), mdReceive(3dm)


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
malloc_cv IRIX WorkShop memory allocation library
malloc_ss IRIX SpeedShop memory allocation library
malloc IRIX WorkShop memory allocation library
memalloc_attr Tru64 Query the memory allocation policy and attributes (libnuma library)
synthpanel IRIX 16 channel MIDI control panel
cfree OpenBSD memory allocation and deallocation
malloc OpenBSD memory allocation and deallocation
malloc.conf OpenBSD memory allocation and deallocation
realloc OpenBSD memory allocation and deallocation
free OpenBSD memory allocation and deallocation
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service