Keep pool allocator up to date (even though we aren't enabling it)
This commit is contained in:
parent
adabbca14b
commit
32d0b3141a
@ -134,6 +134,8 @@ void storage_init(const char *tmpfilePath, size_t cbFileReserve)
|
||||
{
|
||||
serverAssert(mkdisk == NULL);
|
||||
mkdisk = MEMKIND_DEFAULT;
|
||||
pool_initialize(&poolobj, sizeof(robj));
|
||||
pool_initialize(&poolembstrobj, EMBSTR_ROBJ_SIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -169,9 +171,6 @@ void storage_init(const char *tmpfilePath, size_t cbFileReserve)
|
||||
cbFileReserve = 1*1024*1024*1024; // 1 GB (enough to be interesting)
|
||||
posix_fallocate64(memkind_fd(mkdisk), 0, cbFileReserve);
|
||||
|
||||
pool_initialize(&poolobj, sizeof(robj));
|
||||
pool_initialize(&poolembstrobj, EMBSTR_ROBJ_SIZE);
|
||||
|
||||
pthread_atfork(handle_prefork, handle_postfork_parent, handle_postfork_child);
|
||||
}
|
||||
}
|
||||
|
@ -17,4 +17,9 @@ void sfree(void*);
|
||||
void *srealloc(void *pv, size_t cb, enum MALLOC_CLASS mclass);
|
||||
size_t salloc_usable_size(void *ptr);
|
||||
|
||||
struct redisObject *salloc_objembstr();
|
||||
void sfree_objembstr(struct redisObject *obj);
|
||||
struct redisObject *salloc_obj();
|
||||
void sfree_obj(struct redisObject *obj);
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user