Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Functions
pool.c File Reference
#include <stddef.h>
#include <string.h>
#include "mruby.h"
Include dependency graph for pool.c:

Go to the source code of this file.

Data Structures

struct  mrb_pool_page
struct  mrb_pool

Macros

#define POOL_ALIGNMENT   4
#define POOL_PAGE_SIZE   16000
#define ALIGN_PADDING(x)   ((-x) & (POOL_ALIGNMENT - 1))

Functions

mrb_poolmrb_pool_open (mrb_state *mrb)
void mrb_pool_close (mrb_pool *pool)
void * mrb_pool_alloc (mrb_pool *pool, size_t len)
mrb_bool mrb_pool_can_realloc (mrb_pool *pool, void *p, size_t len)
void * mrb_pool_realloc (mrb_pool *pool, void *p, size_t oldlen, size_t newlen)

Macro Definition Documentation

#define ALIGN_PADDING (   x)    ((-x) & (POOL_ALIGNMENT - 1))

Definition at line 44 of file pool.c.

#define POOL_ALIGNMENT   4

Definition at line 15 of file pool.c.

#define POOL_PAGE_SIZE   16000

Definition at line 19 of file pool.c.

Function Documentation

void* mrb_pool_alloc ( mrb_pool pool,
size_t  len 
)

Definition at line 94 of file pool.c.

Here is the caller graph for this function:

mrb_bool mrb_pool_can_realloc ( mrb_pool pool,
void *  p,
size_t  len 
)

Definition at line 122 of file pool.c.

void mrb_pool_close ( mrb_pool pool)

Definition at line 63 of file pool.c.

Here is the call graph for this function:

Here is the caller graph for this function:

mrb_pool* mrb_pool_open ( mrb_state mrb)
read

Definition at line 50 of file pool.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void* mrb_pool_realloc ( mrb_pool pool,
void *  p,
size_t  oldlen,
size_t  newlen 
)

Definition at line 143 of file pool.c.

Here is the call graph for this function: