xinyiZzz commented on code in PR #9581: URL: https://github.com/apache/doris/pull/9581#discussion_r908185221
########## be/src/vec/common/allocator.h: ########## @@ -101,12 +113,75 @@ template <bool clear_memory_, bool mmap_populate> class Allocator { public: /// Allocate memory range. - void* alloc(size_t size, size_t alignment = 0) { return alloc_no_track(size, alignment); } + void* alloc(size_t size, size_t alignment = 0) { + void* buf; + + if (size >= MMAP_THRESHOLD) { + if (alignment > MMAP_MIN_ALIGNMENT) Review Comment: No need for zero-fill, because mmap guarantees it. -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org