Flux Reference Manual |
---|
flux-data-cache —
#define FLUX_DATA_CACHE (object) struct FluxDataCache; void flux_data_cache_init (FluxDataCache *cache, guint elem_size, guint elem_num); FluxDataCache* flux_data_cache_new (guint elem_size, guint elem_num); void flux_data_cache_finalize (FluxObject *cache); void flux_data_cache_flush (FluxDataCache *cache); gconstpointer flux_data_cache_insert (FluxDataCache *cache, guint key, gconstpointer data); gpointer flux_data_cache_get_insert_ptr (FluxDataCache *cache, guint key); gconstpointer flux_data_cache_get_ptr (FluxDataCache *cache, guint key); gboolean flux_data_cache_get_data (FluxDataCache *cache, guint key, gpointer dest);
struct FluxDataCache { FluxObject object; guint elem_size; guint elem_num; guint *key; gpointer data; gulong hits; gulong misses; };
void flux_data_cache_init (FluxDataCache *cache, guint elem_size, guint elem_num);
cache : | |
elem_size : | |
elem_num : |
FluxDataCache* flux_data_cache_new (guint elem_size, guint elem_num);
elem_size: Bytes per element. elem_num: Number of elements in the cache.
Creates a new FluxDataCache with elem_size bytes per element and elem_num elements.
elem_size : | |
elem_num : | |
Returns : | A new FluxDataCache. |
gconstpointer flux_data_cache_insert (FluxDataCache *cache, guint key, gconstpointer data);
cache : | |
key : | |
data : | |
Returns : |
gpointer flux_data_cache_get_insert_ptr (FluxDataCache *cache, guint key);
cache : | |
key : | |
Returns : |
gconstpointer flux_data_cache_get_ptr (FluxDataCache *cache, guint key);
cache : | |
key : | |
Returns : |
gboolean flux_data_cache_get_data (FluxDataCache *cache, guint key, gpointer dest);
cache : | |
key : | |
dest : | |
Returns : |
<< flux-mem-chunk | Entropy and Cryptography >> |