MCPcopy Create free account
hub / github.com/PX4/eigen / check_aligned_new

Function check_aligned_new

test/dynalloc.cpp:44–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void check_aligned_new()
45{
46 for(int i = ALIGNMENT; i < 1000; i++)
47 {
48 float *p = internal::aligned_new<float>(i);
49 VERIFY(internal::UIntPtr(p)%ALIGNMENT==0);
50 // if the buffer is wrongly allocated this will give a bad write --> check with valgrind
51 for(int j = 0; j < i; j++) p[j]=0;
52 internal::aligned_delete(p,i);
53 }
54}
55
56void check_aligned_stack_alloc()
57{

Callers 1

test_dynallocFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_dynallocFunction · 0.68