The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Macros | Typedefs | Functions | Variables
message_set_test.c File Reference
#include <freeradius-devel/io/message.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/hash.h>
#include <freeradius-devel/util/syserror.h>
#include <freeradius-devel/util/talloc.h>
#include <string.h>
#include <sys/time.h>
+ Include dependency graph for message_set_test.c:

Go to the source code of this file.

Data Structures

struct  fr_test_t
 

Macros

#define ALLOC_SIZE   (8)
 
#define ARRAY_SIZE   (4 * ALLOC_SIZE)
 
#define MPRINT1   if (debug_lvl) printf
 
#define MPRINT2   if (debug_lvl > 1) printf
 
#define MY_ARRAY_SIZE   (16 * ARRAY_SIZE)
 

Typedefs

typedef struct request_s request_t
 

Functions

static void alloc_blocks (fr_message_set_t *ms, uint32_t *seed, UNUSED int *start, int *end)
 
static void free_blocks (UNUSED fr_message_set_t *ms, UNUSED uint32_t *seed, int *start, int *end)
 
int main (int argc, char *argv[])
 
request_trequest_alloc (UNUSED TALLOC_CTX *ctx, UNUSED request_init_args_t const *args)
 
void request_verify (UNUSED char const *file, UNUSED int line, UNUSED request_t *request)
 
static NEVER_RETURNS void usage (void)
 

Variables

static size_t allocation_mask = 0x3ff
 
static size_t array [MY_ARRAY_SIZE]
 
static int debug_lvl = 0
 
static fr_test_tmessages [MY_ARRAY_SIZE]
 
static int my_alloc_size = ALLOC_SIZE
 
static size_t reserve_size = 2048
 
static char const * seed_string = "foo"
 
static size_t seed_string_len = 3
 
static bool touch_memory = false
 
static size_t used = 0
 

Data Structure Documentation

◆ fr_test_t

struct fr_test_t

Definition at line 45 of file message_set_test.c.

+ Collaboration diagram for fr_test_t:
Data Fields
int bar
int foo
fr_message_t m

Macro Definition Documentation

◆ ALLOC_SIZE

#define ALLOC_SIZE   (8)

Definition at line 41 of file message_set_test.c.

◆ ARRAY_SIZE

#define ARRAY_SIZE   (4 * ALLOC_SIZE)

Definition at line 42 of file message_set_test.c.

◆ MPRINT1

#define MPRINT1   if (debug_lvl) printf

Definition at line 38 of file message_set_test.c.

◆ MPRINT2

#define MPRINT2   if (debug_lvl > 1) printf

Definition at line 39 of file message_set_test.c.

◆ MY_ARRAY_SIZE

#define MY_ARRAY_SIZE   (16 * ARRAY_SIZE)

Definition at line 43 of file message_set_test.c.

Typedef Documentation

◆ request_t

typedef struct request_s request_t

Definition at line 63 of file message_set_test.c.

Function Documentation

◆ alloc_blocks()

static void alloc_blocks ( fr_message_set_t ms,
uint32_t seed,
UNUSED int *  start,
int *  end 
)
static

Definition at line 82 of file message_set_test.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free_blocks()

static void free_blocks ( UNUSED fr_message_set_t ms,
UNUSED uint32_t seed,
int *  start,
int *  end 
)
static

Definition at line 137 of file message_set_test.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 188 of file message_set_test.c.

+ Here is the call graph for this function:

◆ request_alloc()

request_t* request_alloc ( UNUSED TALLOC_CTX *  ctx,
UNUSED request_init_args_t const *  args 
)

Definition at line 70 of file message_set_test.c.

◆ request_verify()

void request_verify ( UNUSED char const *  file,
UNUSED int  line,
UNUSED request_t request 
)

Definition at line 75 of file message_set_test.c.

◆ usage()

static NEVER_RETURNS void usage ( void  )
static

Definition at line 178 of file message_set_test.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ allocation_mask

size_t allocation_mask = 0x3ff
static

Definition at line 63 of file message_set_test.c.

◆ array

size_t array[MY_ARRAY_SIZE]
static

Definition at line 52 of file message_set_test.c.

◆ debug_lvl

int debug_lvl = 0
static

Definition at line 56 of file message_set_test.c.

◆ messages

fr_test_t* messages[MY_ARRAY_SIZE]
static

Definition at line 53 of file message_set_test.c.

◆ my_alloc_size

int my_alloc_size = ALLOC_SIZE
static

Definition at line 54 of file message_set_test.c.

◆ reserve_size

size_t reserve_size = 2048
static

Definition at line 62 of file message_set_test.c.

◆ seed_string

char const* seed_string = "foo"
static

Definition at line 59 of file message_set_test.c.

◆ seed_string_len

size_t seed_string_len = 3
static

Definition at line 60 of file message_set_test.c.

◆ touch_memory

bool touch_memory = false
static

Definition at line 57 of file message_set_test.c.

◆ used

size_t used = 0
static

Definition at line 51 of file message_set_test.c.