You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by da...@apache.org on 2022/10/21 14:11:47 UTC

[doris] branch branch-1.2-unstable updated: [memory](podarray) revert not allocate too much memory in podarray change (#13457)

This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-1.2-unstable
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.2-unstable by this push:
     new 83b95f7ebb [memory](podarray) revert not allocate too much memory in podarray change (#13457)
83b95f7ebb is described below

commit 83b95f7ebb5472f3444d4a007621df5c25632ea1
Author: yiguolei <67...@qq.com>
AuthorDate: Wed Oct 19 14:08:44 2022 +0800

    [memory](podarray) revert not allocate too much memory in podarray change (#13457)
    
    revert not allocate too much memory in podarray change
---
 be/src/vec/common/pod_array.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/vec/common/pod_array.h b/be/src/vec/common/pod_array.h
index 10a8ed8d75..0b979fd6a8 100644
--- a/be/src/vec/common/pod_array.h
+++ b/be/src/vec/common/pod_array.h
@@ -229,7 +229,7 @@ public:
     template <typename... TAllocatorParams>
     void reserve(size_t n, TAllocatorParams&&... allocator_params) {
         if (n > capacity())
-            realloc(minimum_memory_for_elements(n),
+            realloc(round_up_to_power_of_two_or_zero(minimum_memory_for_elements(n)),
                     std::forward<TAllocatorParams>(allocator_params)...);
     }
 


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