CliXoN
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions | Variables
clixon_chunk.c File Reference
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <stdarg.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/types.h>
#include "clixon_queue.h"
#include "clixon_chunk.h"

Functions

static void chunk_initialize ()
 
static int chunk_new_block (chunk_head_t *chead)
 
static void chunk_release_block (chunk_block_t *cblk)
 
static void * chunk_alloc (size_t len)
 
void * chunk (size_t len, const char *name)
 
void * rechunk (void *ptr, size_t len, const char *name)
 
void unchunk (void *ptr)
 
void unchunk_group (const char *name)
 
void * chunkdup (const void *ptr, size_t len, const char *name)
 
size_t chunksize (void *ptr)
 
char * chunk_strncat (const char *dst, const char *src, size_t n, const char *name)
 
char * chunk_sprintf (const char *name, char *fmt,...)
 
void chunk_check (FILE *fout, const char *name)
 

Variables

static chunk_head_t chunk_heads [CHUNK_HEADS]
 
static int chunk_initialized = 0
 
static int chunk_pagesz
 
static chunk_group_t * chunk_grp
 
static int dont_unchunk_group
 

Function Documentation

void* chunk ( size_t  len,
const char *  name 
)
static void* chunk_alloc ( size_t  len)
static
void chunk_check ( FILE *  fout,
const char *  name 
)
static void chunk_initialize ( )
static
static int chunk_new_block ( chunk_head_t *  chead)
static
static void chunk_release_block ( chunk_block_t *  cblk)
static
char* chunk_sprintf ( const char *  name,
char *  fmt,
  ... 
)
char* chunk_strncat ( const char *  dst,
const char *  src,
size_t  n,
const char *  name 
)
void* chunkdup ( const void *  ptr,
size_t  len,
const char *  name 
)
size_t chunksize ( void *  ptr)
void* rechunk ( void *  ptr,
size_t  len,
const char *  name 
)
void unchunk ( void *  ptr)
void unchunk_group ( const char *  name)

Variable Documentation

chunk_group_t* chunk_grp
static
chunk_head_t chunk_heads[CHUNK_HEADS]
static
int chunk_initialized = 0
static
int chunk_pagesz
static
int dont_unchunk_group
static