]> git.ipfire.org Git - thirdparty/gcc.git/commit - libitm/util.cc
Allocate memory on cache line if requested
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 19 Apr 2016 17:01:11 +0000 (17:01 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 19 Apr 2016 17:01:11 +0000 (10:01 -0700)
commit831698b8f7e479506b2f7156ce54fe95b7126c1c
tree3273b0d938e451bbc5bab2642961a56fc6ba064b
parentd855ad89cbf9f70c1f2cd1e0eea7be4e08f769d8
Allocate memory on cache line if requested

Since GTM::gtm_thread has

gtm_thread *next_thread __attribute__((__aligned__(HW_CACHELINE_SIZE)));

GTM::gtm_thread::operator new () calls xmalloc with separate_cl == true.
xmalloc must return memory on cache line in this case.

PR libitm/70456
* util.cc (xmalloc): Use posix_memalign to allocate memory on
on cache line if requested.

From-SVN: r235211
libitm/ChangeLog
libitm/util.cc