Kiwi Engine
VM for interpreter
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Macros | Functions
KEValueTablePool.h File Reference

Define KEValueTablePool class. More...

#include <Coconut/Coconut.h>
#include "KEForwarders.h"

Go to the source code of this file.

Data Structures

struct  KEValueTablePool
 KEProgram class. More...
 

Macros

#define KEValueTablePoolNum   32
 

Functions

void KEInitValueTablePool (struct KEValueTablePool *dst, struct CNResource *resource)
 Allocate value table pool. More...
 
void KEDestroyValueTablePool (struct KEValueTablePool *dst)
 Destroy value table pool. More...
 
struct KEValueTableKEAllocateValueTableFromPool (struct KEValueTablePool *pool, uint64_t valnum)
 Allocate KEValueTable object from the pool. More...
 
void KEReleaseValueTableIntoPool (struct KEValueTablePool *pool, struct KEValueTable *dst)
 Release KEValueTable object into the pool. More...
 
void KEDumpValueTablePool (struct CNText *buf, const struct KEValueTablePool *src)
 Dump the content of KEValueTablePool. More...
 

Detailed Description

Define KEValueTablePool class.

Copyright
Copyright (C) 2014 Steel Wheels Project

Macro Definition Documentation

#define KEValueTablePoolNum   32

Default number of hash array for the value table pool

Function Documentation

struct KEValueTable* KEAllocateValueTableFromPool ( struct KEValueTablePool pool,
uint64_t  valnum 
)

Allocate KEValueTable object from the pool.

Returns
Allocated KEValueTable object
Parameters
poolPool of the value table
valnumNumber of values in the table
void KEDestroyValueTablePool ( struct KEValueTablePool dst)

Destroy value table pool.

Parameters
dstDestination value table pool
void KEDumpValueTablePool ( struct CNText *  buf,
const struct KEValueTablePool src 
)

Dump the content of KEValueTablePool.

Parameters
bufOutput buffer
srcSource value table pool
void KEInitValueTablePool ( struct KEValueTablePool dst,
struct CNResource *  resource 
)

Allocate value table pool.

Returns
Allocated value table pool
Parameters
dstDestination value table pool
resourceResouce to allocate value table
void KEReleaseValueTableIntoPool ( struct KEValueTablePool pool,
struct KEValueTable dst 
)

Release KEValueTable object into the pool.

Parameters
poolPool to release the value table
dstDestination value table