Go to the documentation of this file.
26 #ifndef SURICATA_UTIL_STORAGE_H
27 #define SURICATA_UTIL_STORAGE_H
void StorageFreeAll(Storage *storage, const StorageEnum type)
void StorageFreeById(Storage *storage, const StorageEnum type, const int id)
int StorageFinalize(void)
void * StorageAllocByIdPrealloc(Storage *storage, StorageEnum type, int id)
AllocById func for prealloc'd base storage (storage ptrs are part of another memory block)
enum StorageEnum_ StorageEnum
void * StorageGetById(const Storage *storage, const StorageEnum type, const int id)
get storage for id
unsigned int StorageGetSize(const StorageEnum type)
get the size of the void array used to store the pointers
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.
int StorageSetById(Storage *storage, const StorageEnum type, const int id, void *ptr)
set storage for id
unsigned int StorageGetCnt(const StorageEnum type)