irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

region.h File Reference
#include <stdio.h>
#include <setjmp.h>
Include dependency graph for region.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  region_error
struct  region_node
struct  region
struct  region_desc


#define DEFAULT_BLOCK_SIZE   1024
#define roundToAlignment(x)   ((x)%REGION_ALIGNMENT == 0?(x):(((x)/REGION_ALIGNMENT)+1)*REGION_ALIGNMENT)
#define CACHE_ELEM(t, p, i)   (((t)p)+i)
#define CACHE_SIZE(t, l)   roundToAlignment(sizeof(t)*l)
#define IN_REGION(x, r)   (((RegionDesc *)(((const unsigned char*)(x))-CACHE_SIZE(RegionDesc, 1)))->region == (r))
#define SET_DELETE(x)   (((RegionDesc *)(((const unsigned char*)(x))-CACHE_SIZE(RegionDesc, 1)))->del=1)
#define DELETED(x)   (((RegionDesc *)(((const unsigned char*)(x))-CACHE_SIZE(RegionDesc, 1)))->del)
#define SIZE(x)   (((RegionDesc *)(((const unsigned char*)(x))-CACHE_SIZE(RegionDesc, 1)))->size)


typedef struct region Region
typedef struct region_desc RegionDesc


Regionmake_region (size_t is, jmp_buf *label)
void * region_alloc (Region *r, size_t s)
void region_free (Region *r)
size_t region_size (Region *r)

Macro Definition Documentation


#define CACHE_ELEM (   t,
)    (((t)p)+i)

Definition at line 15 of file region.h.


#define CACHE_SIZE (   t,
)    roundToAlignment(sizeof(t)*l)

Definition at line 17 of file region.h.


#define DEFAULT_BLOCK_SIZE   1024

Definition at line 10 of file region.h.


#define DELETED (   x)    (((RegionDesc *)(((const unsigned char*)(x))-CACHE_SIZE(RegionDesc, 1)))->del)

Definition at line 60 of file region.h.


#define IN_REGION (   x,
)    (((RegionDesc *)(((const unsigned char*)(x))-CACHE_SIZE(RegionDesc, 1)))->region == (r))

Definition at line 58 of file region.h.



Definition at line 12 of file region.h.

◆ roundToAlignment

#define roundToAlignment (   x)    ((x)%REGION_ALIGNMENT == 0?(x):(((x)/REGION_ALIGNMENT)+1)*REGION_ALIGNMENT)

Definition at line 13 of file region.h.


#define SET_DELETE (   x)    (((RegionDesc *)(((const unsigned char*)(x))-CACHE_SIZE(RegionDesc, 1)))->del=1)

Definition at line 59 of file region.h.


#define SIZE (   x)    (((RegionDesc *)(((const unsigned char*)(x))-CACHE_SIZE(RegionDesc, 1)))->size)

Definition at line 61 of file region.h.

Typedef Documentation

◆ Region

typedef struct region Region

◆ RegionDesc

typedef struct region_desc RegionDesc

Function Documentation

◆ make_region()

Region* make_region ( size_t  is,
jmp_buf *  label 

◆ region_alloc()

◆ region_free()

◆ region_size()

size_t region_size ( Region r)

Definition at line 157 of file region.cpp.

References region::head, and NULL.