Asterisk - The Open Source Telephony Project  18.5.0
Data Structures | Macros
page.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SPLIT_RETURN
 

Macros

#define BIGOVERHEAD   (4*sizeof(u_int16_t))
 
#define FREESPACE(P)   ((P)[(P)[0]+1])
 
#define KEYSIZE(K)   (4*sizeof(u_int16_t) + (K)->size);
 
#define OFFSET(P)   ((P)[(P)[0]+2])
 
#define OVFLSIZE   (2*sizeof(u_int16_t))
 
#define PAGE_META(N)   (((N)+3) * sizeof(u_int16_t))
 
#define PAIRFITS(P, K, D)
 
#define PAIRSIZE(K, D)   (2*sizeof(u_int16_t) + (K)->size + (D)->size)
 

Macro Definition Documentation

◆ BIGOVERHEAD

#define BIGOVERHEAD   (4*sizeof(u_int16_t))

Definition at line 77 of file page.h.

Referenced by __big_insert().

◆ FREESPACE

#define FREESPACE (   P)    ((P)[(P)[0]+1])

◆ KEYSIZE

#define KEYSIZE (   K)    (4*sizeof(u_int16_t) + (K)->size);

Definition at line 78 of file page.h.

◆ OFFSET

#define OFFSET (   P)    ((P)[(P)[0]+2])

◆ OVFLSIZE

#define OVFLSIZE   (2*sizeof(u_int16_t))

Definition at line 79 of file page.h.

Referenced by __add_ovflpage(), and __big_split().

◆ PAGE_META

#define PAGE_META (   N)    (((N)+3) * sizeof(u_int16_t))

Definition at line 85 of file page.h.

Referenced by __big_delete(), and __big_insert().

◆ PAIRFITS

#define PAIRFITS (   P,
  K,
 
)
Value:
(((P)[2] >= REAL_KEY) && \
(PAIRSIZE((K),(D)) + OVFLSIZE) <= FREESPACE((P)))
#define FREESPACE(P)
Definition: page.h:80
#define REAL_KEY
Definition: hash.h:271
#define PAIRSIZE(K, D)
Definition: page.h:76
#define P(protos)
Definition: proto.h:51
#define OVFLSIZE
Definition: page.h:79

Definition at line 82 of file page.h.

Referenced by __addel(), and ugly_split().

◆ PAIRSIZE

#define PAIRSIZE (   K,
 
)    (2*sizeof(u_int16_t) + (K)->size + (D)->size)

Definition at line 76 of file page.h.

Referenced by __addel(), and squeeze_key().