...
| Code Block | ||
|---|---|---|
| ||
size_t size = 16;
size_t alignment = 1<<12;
float *ptr;
double *ptr1;
ptr = aligned_alloc(align , size);
if(align == alignof(ptr1)) {
ptr1 = realloc(ptr, size);
}
|
Implementation
...
Details
| Wiki Markup |
|---|
This program produces the following (unexpected) output on the x86_64-redhat-linux platform that was compiled with gcc version 4.1.2. (ptr\[0\] is initialized to 12.5 and ptr\[1\] is initialized to 25.5) |
...