Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util: Make xmalloc_cacheline() allocate full cachelines.
Until now, xmalloc_cacheline() has provided its caller memory that does not share a cache line, but when posix_memalign() is not available it did not provide a full cache line; instead, it returned memory that was offset 8 bytes into a cache line. This makes it hard for clients to design structures to be cache line-aligned. This commit changes xmalloc_cacheline() to always return a full cache line instead of memory offset into one. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Bhanuprakash Bodireddy <Bhanuprakash.bodireddy@intel.com> Tested-by: Bhanuprakash Bodireddy <Bhanuprakash.bodireddy@intel.com> Tested-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-November/341362.html
- Loading branch information
Showing
1 changed file
with
32 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters