libxmp/libxmpf in Omni Compiler  1.3.4
_xmpco_alloc.h File Reference
#include "xmpco_internal.h"
#include "_xmpco_alloc.h"
Include dependency graph for _xmpco_alloc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _resourceSet_t
 MEMORY MANAGEMENT STRUCTURE-I (for automatic deallocation) runtime resource corresponding to a procedure or to the entire program. More...
 
struct  _memoryChunk_t
 structure for each malloc/free call Every memory chunk is linked both: More...
 
struct  _coarrayInfo_t
 structure for each coarray variable One or more coarrays can be linked from a single memory chunk and be malloc'ed and be free'd together. More...
 
struct  _memoryChunkOrder_t
 MEMORY MANAGEMENT STRUCTURE-II (for dynamic ALLOCATE/DEALLOCATE stmts. More...
 
struct  _sortedChunkTable_t
 MEMORY MANAGEMENT STRUCTURE-III (for binary search for memory chunk) table of memory chunks sorted in order of local address. More...
 

Macros

#define _SortedChunkTableInitSize   256
 
#define DIV_CEILING(m, n)   (((m)-1)/(n)+1)
 
#define forallMemoryChunkOrder(cp)
 
#define forallMemoryChunkOrderRev(cp)
 
#define forallResourceSet(rs)
 
#define forallResourceSetRev(rs)
 
#define forallMemoryChunk(chk, rs)
 
#define forallMemoryChunkRev(chk, rs)
 
#define forallCoarrayInfo(ci, chk)
 
#define IsFirstCoarrayInfo(ci)   ((ci)->prev->prev == NULL)
 
#define IsLastCoarrayInfo(ci)   ((ci)->next->next == NULL)
 
#define IsOnlyCoarrayInfo(ci)   (IsFirstCoarrayInfo(ci) && IsLastCoarrayInfo(ci))
 
#define IsFirstMemoryChunk(chk)   ((chk)->prev->prev == NULL)
 
#define IsLastMemoryChunk(chk)   ((chk)->next->next == NULL)
 
#define IsEmptyMemoryChunk(chk)   ((chk)->headCoarray->next->next == NULL)
 
#define IsEmptyResourceSet(rs)   ((rs)->headChunk->next->next == NULL)
 

Macro Definition Documentation

◆ _SortedChunkTableInitSize

#define _SortedChunkTableInitSize   256

◆ DIV_CEILING

#define DIV_CEILING (   m,
 
)    (((m)-1)/(n)+1)

◆ forallCoarrayInfo

#define forallCoarrayInfo (   ci,
  chk 
)
Value:
for(CoarrayInfo_t *_ci1_ = ((ci)=(chk)->headCoarray->next)->next; \
_ci1_ != NULL; \
(ci) = _ci1_, _ci1_=_ci1_->next)
structure for each coarray variable One or more coarrays can be linked from a single memory chunk and...
Definition: _xmpco_alloc.h:92
CoarrayInfo_t * next
Definition: _xmpco_alloc.h:94

◆ forallMemoryChunk

#define forallMemoryChunk (   chk,
  rs 
)
Value:
for(MemoryChunk_t *_chk1_=((chk)=(rs)->headChunk->next)->next; \
_chk1_ != NULL; \
(chk)=_chk1_, _chk1_=_chk1_->next)
structure for each malloc/free call Every memory chunk is linked both:
Definition: _xmpco_alloc.h:76
MemoryChunk_t * next
Definition: _xmpco_alloc.h:78

◆ forallMemoryChunkOrder

#define forallMemoryChunkOrder (   cp)
Value:
for(MemoryChunkOrder_t *_cp1_=((cp)=_mallocStack.head->next)->next; \
_cp1_ != NULL; \
(cp)=_cp1_, _cp1_=_cp1_->next)
MEMORY MANAGEMENT STRUCTURE-II (for dynamic ALLOCATE/DEALLOCATE stmts.
Definition: _xmpco_alloc.h:111
MemoryChunkOrder_t * next
Definition: _xmpco_alloc.h:113
struct @2 _mallocStack

◆ forallMemoryChunkOrderRev

#define forallMemoryChunkOrderRev (   cp)
Value:
for(MemoryChunkOrder_t *_cp1_=((cp)=_mallocStack.tail->prev)->prev; \
_cp1_ != NULL; \
(cp)=_cp1_, _cp1_=_cp1_->prev)
MemoryChunkOrder_t * prev
Definition: _xmpco_alloc.h:112

◆ forallMemoryChunkRev

#define forallMemoryChunkRev (   chk,
  rs 
)
Value:
for(MemoryChunk_t *_chk1_=((chk)=(rs)->tailChunk->prev)->prev; \
_chk1_ != NULL; \
(chk) = _chk1_, _chk1_=_chk1_->prev)
MemoryChunk_t * prev
Definition: _xmpco_alloc.h:77

◆ forallResourceSet

#define forallResourceSet (   rs)
Value:
for(ResourceSet_t *_rs1_=((rs)=_headResourceSet->next)->next; \
_rs1_ != NULL; \
(rs)=_rs1_, _rs1_=_rs1_->next)
MEMORY MANAGEMENT STRUCTURE-I (for automatic deallocation) runtime resource corresponding to a proced...
Definition: _xmpco_alloc.h:64

◆ forallResourceSetRev

#define forallResourceSetRev (   rs)
Value:
for(ResourceSet_t *_rs1_=((rs)=_tailResourceSet->prev)->prev; \
_rs1_ != NULL; \
(rs)=_rs1_, _rs1_=_rs1_->prev)

◆ IsEmptyMemoryChunk

#define IsEmptyMemoryChunk (   chk)    ((chk)->headCoarray->next->next == NULL)

◆ IsEmptyResourceSet

#define IsEmptyResourceSet (   rs)    ((rs)->headChunk->next->next == NULL)

◆ IsFirstCoarrayInfo

#define IsFirstCoarrayInfo (   ci)    ((ci)->prev->prev == NULL)

◆ IsFirstMemoryChunk

#define IsFirstMemoryChunk (   chk)    ((chk)->prev->prev == NULL)

◆ IsLastCoarrayInfo

#define IsLastCoarrayInfo (   ci)    ((ci)->next->next == NULL)

◆ IsLastMemoryChunk

#define IsLastMemoryChunk (   chk)    ((chk)->next->next == NULL)

◆ IsOnlyCoarrayInfo

#define IsOnlyCoarrayInfo (   ci)    (IsFirstCoarrayInfo(ci) && IsLastCoarrayInfo(ci))