Closed alyapunov closed 3 years ago
This day I prefer such option per space, to enable it only for spaces with some array data at field. These are spaces with:
array
After discussion with @lyapunov and @Korablev77, we decided the following:
class Allocator {
public:
static inline void* alloc(size_t size);
static inline void free(void *ptr, size);
static inline void create(/* specific for this allocator arguments */);
static inline void destroy(void);
static inline void stats(struct allocator_stats *stats);
private:
/* specific for allocator private static members */
};
Slab allocator, which is used for allocation tuples, has a certain disadvantage - it tends to unresolvable fragmentation on certain workloads (size migration).
Provide an option in box.cfg that allows to choose some other allocator for memtx tuples. At least it must be simple allocator like hpall (there must a branch). At most - log structurea allocator (like lsall, also on the same branch).
There's also an idea to make that option per space, but I'm not sure.