You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/06/27 11:38:10 UTC

[GitHub] [doris] dataroaring commented on a diff in pull request #10446: alloc aligned memory for block bloom filter to work with jemalloc

dataroaring commented on code in PR #10446:
URL: https://github.com/apache/doris/pull/10446#discussion_r907286437


##########
be/src/exprs/block_bloom_filter_impl.cc:
##########
@@ -69,8 +72,12 @@ Status BlockBloomFilter::init_internal(const int log_space_bytes, uint32_t hash_
 
     const size_t alloc_size = directory_size();
     close(); // Ensure that any previously allocated memory for directory_ is released.
-    _mem_holder.reset(new char[alloc_size]);
-    _directory = (Bucket*)_mem_holder.get();
+    DCHECK(_directory == nullptr);
+    int rc = posix_memalign((void**)&_directory, 32, alloc_size);

Review Comment:
   The patch fixes the problem when using jemalloc, does not enable jemalloc.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org