You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ap...@apache.org on 2020/04/06 08:40:28 UTC

[arrow] branch master updated: ARROW-8320: [Format] Add clarification to CDataInterface.rst regarding memory alignment of buffers

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 96a2522  ARROW-8320: [Format] Add clarification to CDataInterface.rst regarding memory alignment of buffers
96a2522 is described below

commit 96a252290714000c3c9136955c850e2c287e4a51
Author: Wes McKinney <we...@apache.org>
AuthorDate: Mon Apr 6 10:39:39 2020 +0200

    ARROW-8320: [Format] Add clarification to CDataInterface.rst regarding memory alignment of buffers
    
    This recommends at least a minimum alignment based on the type of data the buffer contains. For example, if the buffer contains `int32_t` data, then a minimum of 4-byte alignment is recommended.
    
    If an Arrow implementation finds unaligned memory burdensome due to aliasing issues or undefined behavior, this also clarifies that they are not expected to support it.
    
    Closes #6840 from wesm/ARROW-8320
    
    Authored-by: Wes McKinney <we...@apache.org>
    Signed-off-by: Antoine Pitrou <an...@python.org>
---
 docs/source/format/CDataInterface.rst | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/docs/source/format/CDataInterface.rst b/docs/source/format/CDataInterface.rst
index 5ce7ae5..be80a8a 100644
--- a/docs/source/format/CDataInterface.rst
+++ b/docs/source/format/CDataInterface.rst
@@ -440,6 +440,10 @@ It has the following fields:
    represent `length + offset` values encoded according to the
    :ref:`Columnar format specification <format_columnar>`.
 
+   It is recommended, but not required, that the memory addresses of the
+   buffers be aligned at least according to the type of primitive data that
+   they contain. Consumers MAY decide not to support unaligned memory.
+
    The pointer to the null bitmap buffer, if the data type specifies one,
    MAY be NULL only if :c:member:`ArrowArray.null_count` is 0.