forked from bartvdbraak/blender
Use Blender codestyle, not Google's one!
This commit is contained in:
parent
16d64a99b4
commit
a6e58cd761
@ -6,7 +6,8 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
void DoBasicAlignmentChecks(const int alignment) {
|
void DoBasicAlignmentChecks(const int alignment)
|
||||||
|
{
|
||||||
int *foo, *bar;
|
int *foo, *bar;
|
||||||
|
|
||||||
foo = (int *) MEM_mallocN_aligned(sizeof(int) * 10, alignment, "test");
|
foo = (int *) MEM_mallocN_aligned(sizeof(int) * 10, alignment, "test");
|
||||||
@ -27,11 +28,13 @@ void DoBasicAlignmentChecks(const int alignment) {
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
TEST(guardedalloc, LockfreeAlignedAlloc16) {
|
TEST(guardedalloc, LockfreeAlignedAlloc16)
|
||||||
|
{
|
||||||
DoBasicAlignmentChecks(16);
|
DoBasicAlignmentChecks(16);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(guardedalloc, GuardedAlignedAlloc16) {
|
TEST(guardedalloc, GuardedAlignedAlloc16)
|
||||||
|
{
|
||||||
MEM_use_guarded_allocator();
|
MEM_use_guarded_allocator();
|
||||||
DoBasicAlignmentChecks(16);
|
DoBasicAlignmentChecks(16);
|
||||||
}
|
}
|
||||||
@ -40,7 +43,8 @@ TEST(guardedalloc, GuardedAlignedAlloc16) {
|
|||||||
// Harmless for Blender, but would be nice to support
|
// Harmless for Blender, but would be nice to support
|
||||||
// eventually.
|
// eventually.
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
TEST(guardedalloc, GuardedAlignedAlloc32) {
|
TEST(guardedalloc, GuardedAlignedAlloc32)
|
||||||
|
{
|
||||||
MEM_use_guarded_allocator();
|
MEM_use_guarded_allocator();
|
||||||
DoBasicAlignmentChecks(16);
|
DoBasicAlignmentChecks(16);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user