Add aligned allocator functions to GSK
authorРуслан Ижбулатов <lrn1986@gmail.com>
Sat, 9 Jun 2018 14:01:03 +0000 (14:01 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Sat, 9 Jun 2018 14:01:03 +0000 (14:01 +0000)
commit8e74eb382f0c617b7b65a6850952d6acc9fd3018
treee872f748eeaf5438315f8e9182e9bc4d39b4e95a
parentbd2e3f5b9bae604e7d75b2d4a5a613cedc469098
Add aligned allocator functions to GSK

The code is mostly stolen from graphene.
Allocators support any alignment, but their implementation
only calls system aligned allocator functions if malloc()
is not aligned to 16-byte boundaries. If it is aligned,
the implementation just calls malloc() regardless of which
alignment is requested by the caller.

This can be fixed by saving the result of meson malloc()
alignment check and adding a few conditions to the implementation,
but right now GSK and GTK only need 16-byte alignment either way.
gsk/gskalloc.c [new file with mode: 0644]
gsk/gskallocprivate.h [new file with mode: 0644]
gsk/meson.build