mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-18 10:56:20 +03:00
Implement aligned_alloc().
Implement aligned_alloc(), which was added in the C11 standard. The function is weakly specified to the point that a minimally compliant implementation would be painful to use (size must be an integral multiple of alignment!), which in practice makes posix_memalign() a safer choice.
This commit is contained in:
parent
4c2faa8a7c
commit
0a0bbf63e5
8 changed files with 218 additions and 14 deletions
25
test/aligned_alloc.exp
Normal file
25
test/aligned_alloc.exp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
Test begin
|
||||
Alignment: 8
|
||||
Alignment: 16
|
||||
Alignment: 32
|
||||
Alignment: 64
|
||||
Alignment: 128
|
||||
Alignment: 256
|
||||
Alignment: 512
|
||||
Alignment: 1024
|
||||
Alignment: 2048
|
||||
Alignment: 4096
|
||||
Alignment: 8192
|
||||
Alignment: 16384
|
||||
Alignment: 32768
|
||||
Alignment: 65536
|
||||
Alignment: 131072
|
||||
Alignment: 262144
|
||||
Alignment: 524288
|
||||
Alignment: 1048576
|
||||
Alignment: 2097152
|
||||
Alignment: 4194304
|
||||
Alignment: 8388608
|
||||
Alignment: 16777216
|
||||
Alignment: 33554432
|
||||
Test end
|
||||
Loading…
Add table
Add a link
Reference in a new issue