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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]