Skip to content

Is it a must to let Aggregation's Accumulator's memory allocation handled by HashStringAllocator? #8469

Answered by lingbin
xumingming asked this question in Q&A
Discussion options

You must be logged in to vote

It seems that a little hacking is needed. After all, the CRoaring library does not expose more interfaces.

The requirement here can be simplified to: when the hook it provides (such as the my_malloc callback function) is called, the corresponding MemoryPool(may be an operator-pool) should be found and updated, right?

I'm not an expert in CRoaring, but I can provide an implementation idea:
we can set the MemoryPool*(may be an operator-pool) object in thread-local before entering the CRoaring library, and then obtain the MemoryPool object of the current thread in the callback, and then call MemoryPool::allocateContinuous() interface.
Is this method feasible?

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@xumingming
Comment options

@lingbin
Comment options

Answer selected by xumingming
@xumingming
Comment options

@Yuhta
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants