| 18 | typedef Matrix<float,8,1> Vector8f; |
| 19 | |
| 20 | void check_handmade_aligned_malloc() |
| 21 | { |
| 22 | for(int i = 1; i < 1000; i++) |
| 23 | { |
| 24 | char *p = (char*)internal::handmade_aligned_malloc(i); |
| 25 | VERIFY(internal::UIntPtr(p)%ALIGNMENT==0); |
| 26 | // if the buffer is wrongly allocated this will give a bad write --> check with valgrind |
| 27 | for(int j = 0; j < i; j++) p[j]=0; |
| 28 | internal::handmade_aligned_free(p); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | void check_aligned_malloc() |
| 33 | { |