[ 
https://issues.apache.org/jira/browse/ARROW-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16538265#comment-16538265
 ] 

Dimitri Vorona commented on ARROW-2822:
---------------------------------------

Ok, thinking further about it: we need to zero the padding in both Resize and 
Reserve. In case of Reserve it can be way more than the last cache line which 
needs to be zeroed, so we shouldn't do it by default. If we don't zero in 
Reserve, but in Resize it's even worse, since we will zero the "tail" over and 
over again.

Bottom line, my proposed solution: we add bool zero_padding flag to Resize 
which is false by default. Then we can search for the Buffer::Resize usages in 
the code, and decide where that flag makes sense. Off course, bool flag creep 
in C++ isn't nice, since you don't have kwargs, but 2 flags are still 
tolerable, IMHO.

> [C++] Zero padding bytes in PoolBuffer::Resize
> ----------------------------------------------
>
>                 Key: ARROW-2822
>                 URL: https://issues.apache.org/jira/browse/ARROW-2822
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Wes McKinney
>            Priority: Major
>
> This is a possible proposed fix which would supersede some of the changes 
> made in ARROW-2790 as elsewhere.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to