davidxu 3c6681dc2c MFC r262277:
malloc_aligned() may not leave enough space for pointer to allocated memory,
saving the pointer will overwrite bytes belongs to another memory block
unexpectly, to fix the problem, use (allocated address + sizeof(void *)) as
initial value, and slip to next aligned address, so maximum extra bytes is
sizeof(void *) + align - 1.

Tested by: Andre Albsmeier < mail at ma17 dot ata dot myota dot orgndre >

MFC r262334:

Increase alignment to size of pointer if the alignment is too small.
Some modules do not align data at least to size of pointer, they uses a
smaller alignment, but our pointer should be aligned to its native
boundary, otherwise on some platforms, hardware alignment checking
will cause bus error.
2014-02-27 02:36:09 +00:00
..
2013-12-28 23:08:58 +00:00
2014-02-24 08:21:49 +00:00
2014-02-24 08:21:49 +00:00
2014-02-24 08:21:49 +00:00
2014-02-24 08:21:49 +00:00
2014-02-24 08:21:49 +00:00
2012-01-07 16:09:54 +00:00
2014-02-24 08:21:49 +00:00
2014-02-24 08:21:49 +00:00
2014-02-24 08:21:49 +00:00
2014-02-24 08:21:49 +00:00
2014-02-24 08:21:49 +00:00
2014-02-24 08:21:49 +00:00
2014-02-24 08:21:49 +00:00
2014-02-24 08:21:49 +00:00
2014-02-27 02:36:09 +00:00
2014-02-24 08:21:49 +00:00
2013-12-28 23:08:58 +00:00
2014-02-24 08:21:49 +00:00
2013-12-28 23:08:58 +00:00