2019-01-29 18:10:46 -05:00
|
|
|
#ifndef __STORAGE_H__
|
|
|
|
#define __STORAGE_H__
|
|
|
|
|
2019-01-30 01:15:10 -05:00
|
|
|
#define OBJ_ENCODING_EMBSTR_SIZE_LIMIT 44 // Note: also defined in object.c - should always match
|
|
|
|
|
2019-01-29 18:10:46 -05:00
|
|
|
enum MALLOC_CLASS
|
|
|
|
{
|
|
|
|
MALLOC_LOCAL,
|
|
|
|
MALLOC_SHARED,
|
|
|
|
};
|
|
|
|
|
|
|
|
void storage_init(void);
|
|
|
|
|
|
|
|
struct redisObject *salloc_obj();
|
|
|
|
void sfree_obj(struct redisObject *obj);
|
2019-01-30 01:15:10 -05:00
|
|
|
struct redisObject *salloc_objembstr();
|
|
|
|
void sfree_objembstr(struct redisObject *obj);
|
2019-01-29 18:10:46 -05:00
|
|
|
|
|
|
|
void *salloc(size_t cb, enum MALLOC_CLASS class);
|
|
|
|
void *scalloc(size_t cb, size_t c, enum MALLOC_CLASS class);
|
|
|
|
void sfree(void*);
|
|
|
|
void *srealloc(void *pv, size_t cb);
|
|
|
|
|
|
|
|
#endif
|