You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by pa...@apache.org on 2022/10/19 06:08:51 UTC

[doris] branch master 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.

panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 1e42598fe6 [memory](podarray) revert not allocate too much memory in podarray change (#13457)
1e42598fe6 is described below

commit 1e42598fe682c8c9723c71429f6fc3596562eb26
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 3ba755d9e6..ae54b13959 100644
--- a/be/src/vec/common/pod_array.h
+++ b/be/src/vec/common/pod_array.h
@@ -235,7 +235,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