arrow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wes McKinney (JIRA)" <>
Subject [jira] [Commented] (ARROW-360) C++: Add method to shrink PoolBuffer using realloc
Date Mon, 02 Jan 2017 22:26:58 GMT


Wes McKinney commented on ARROW-360:

Hm, sorta bad news: We should
definitely permit shrinking the buffer, but if we want to guarantee aligned memory, then we
have to allocate-copy.

What we could do is add a {{MemoryPool::Reallocate}} virtual function with a default implementation
does does reallocate-copy, then an application which might less strict about memory alignment
can choose to use realloc instead of {{posix_memalign}} plus {{memcpy}}.

> C++: Add method to shrink PoolBuffer using realloc
> --------------------------------------------------
>                 Key: ARROW-360
>                 URL:
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Uwe L. Korn
>            Assignee: Uwe L. Korn
> In the case where we have optimistically allocated a large PoolBuffer, we could shrink
it later again using a call to {{realloc}}. This should free the exceeding memory but avoids
an actual {{memcpy}}.

This message was sent by Atlassian JIRA

View raw message