Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rdsalloc(3) [debian man page]

RDSALLOC(3)						      RDS PHYSICAL FUNCTIONS						       RDSALLOC(3)

NAME
rdsalloc - memory allocation function ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr SYNOPSYS
#include "rdsnnn.h" char *rdsalloc( Size, Heap ) unsigned int Size; char Heap; PARAMETER
Size memory size to allocate Heap takes the values RDS_ALLOC_BLOCK or RDS_ALLOC_HEAP (two defined constants). DESCRIPTION
The rdsalloc function can do memory allocation by block or by heap. If the user wants to allocate by block, he sets the parameter Heap to the constant RDS_ALLOC_BLOCK else, he wants to allocate by heap so the parameter Heap is set to RDS_ALLOC_HEAP. If rdsalloc is used with the constant RDS_ALLOC_BLOCK then rdsalloc is used as standard language C function malloc(). If the user allocates by heap then : At the first allocation of the block of size the parameter 'Size', a heap of size multiple of the block Size is allocated. When another allocation of the same size is done then if the the heap isn't full then a pointer (of size='Size') is returned else a new heap is allocated and a pointer returned. Like this, the user does really one allocation (he has many pointers) to minimize fragmentation. Heap allocation is use- full if the user has to allocate many pointers of the same size (ex: rdsrec_list structure). Note: Memory place allocated is set to NULL. RETURN VALUE
pointer to the allocated memory is returned. ERRORS
"Rds202: rdsalloc error, can't continue !" it's impossible to allocate the memory size desired. EXAMPLE
#include "rdsnnn.h" main() { rdsrec_list *Rectangle; rdsfig_list *Figure; Rectangle = (rdsrec_list *) rdsalloc (sizeof(rdsrec_list *),RDS_ALLOC_HEAP); Figure = (rdsfig_list *) rdsalloc (sizeof(rdsfig_list *),RDS_ALLOC_BLOCK); } SEE ALSO
librds, rdsfree BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. ASIM
/LIP6 October 1, 1997 RDSALLOC(3)

Check Out this Related Man Page

REFMBKRDS(3)						      RDS PHYSICAL FUNCTIONS						      REFMBKRDS(3)

NAME
refmbkrds - adds to RDS figure a references from a MBK figure ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr SYNOPSYS
#include "rfmnnn.h" rdsrec_list *refmbkrds( Figure, Reference ) rdsfig_list *Figure; phref_list *Reference; PARAMETER
Figure The RDS figure which has to receive the reference to convert. Reference MBK reference to convert to RDS rectangle. DESCRIPTION
The refmbkrds function creates a RDS reference with a MBK reference. The reference is attached to the RDS figure in parameter of the refm- bkrds function. RETURN VALUE
Pointer to the newly created RDS reference. ERRORS
"Rds202: rdsalloc error, can't continue !" it's impossible to allocate the memory size desired EXAMPLE
#include "mphnnn.h" #include "mutnnn.h" #include "rdsnnn.h" #include "rfmnnn.h" #include "rtlnnn.h" typedef struct UserStruct { char *STRING; void *USER1; } UserStruct; main() { phfig_list *MbkFigure; rdsfig_list *RdsFigure; rdsrec_list *Ref; mbkenv(); rdsenv(); loadrdsparam(); RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) ); MbkFigure->PHREF = addphref ( MbkFigure,"ref_con", "ref_1", 9, 15); Ref = refmbkrds (RdsFigure, MbkFigure->PHREF); viewrdsrec ( Ref ); } SEE ALSO
librfm, viewrfmref, loadrdsparam BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. ASIM
/LIP6 October 1, 1997 REFMBKRDS(3)
Man Page