MCPcopy Create free account
hub / github.com/LucaFulchir/libRaptorQ / check_aligned_malloc

Function check_aligned_malloc

external/eigen3/test/dynalloc.cpp:30–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void check_aligned_malloc()
31{
32 for(int i = 1; i < 1000; i++)
33 {
34 char *p = (char*)internal::aligned_malloc(i);
35 VERIFY(size_t(p)%ALIGNMENT==0);
36 // if the buffer is wrongly allocated this will give a bad write --> check with valgrind
37 for(int j = 0; j < i; j++) p[j]=0;
38 internal::aligned_free(p);
39 }
40}
41
42void check_aligned_new()
43{

Callers 1

test_dynallocFunction · 0.70

Calls 2

aligned_mallocFunction · 0.85
aligned_freeFunction · 0.85

Tested by

no test coverage detected