26#ifndef SURICATA_UTIL_STORAGE_H
27#define SURICATA_UTIL_STORAGE_H
void * StorageGetById(const Storage *storage, const StorageEnum type, const int id)
get storage for id
unsigned int StorageGetCnt(const StorageEnum type)
enum StorageEnum_ StorageEnum
void StorageCleanup(void)
int StorageRegister(const StorageEnum type, const char *name, const unsigned int size, void *(*Alloc)(unsigned int), void(*Free)(void *))
Register new storage.
void StorageFreeAll(Storage *storage, const StorageEnum type)
void StorageFreeById(Storage *storage, const StorageEnum type, const int id)
unsigned int StorageGetSize(const StorageEnum type)
get the size of the void array used to store the pointers
int StorageFinalize(void)
int StorageSetById(Storage *storage, const StorageEnum type, const int id, void *ptr)
set storage for id
void * StorageAllocByIdPrealloc(Storage *storage, StorageEnum type, int id)
AllocById func for prealloc'd base storage (storage ptrs are part of another memory block)