2 * PROJECT: ReactOS api tests
3 * LICENSE: GPLv2+ - See COPYING in the top level directory
4 * PURPOSE: Test for RtlAllocateHeap
5 * PROGRAMMER: Pierre Schweitzer <pierre@reactos.org>
10 #define WIN32_NO_STATUS
11 #include <ndk/rtlfuncs.h>
15 START_TEST(RtlAllocateHeap
)
18 BOOLEAN Aligned
= TRUE
;
20 for (i
= 0; i
< 0x100; ++i
)
22 SetLastError(0xdeadbeef);
23 Buffers
[i
] = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_CREATE_ALIGN_16
, (i
% 16 ) + 1);
24 ASSERT(Buffers
[i
] != NULL
);
25 if (!((ULONG_PTR
)Buffers
[i
] & 0x2))
31 for (i
= 0; i
< 0x100; ++i
)
33 RtlFreeHeap(RtlGetProcessHeap(), 0, Buffers
[i
]);
36 ok(Aligned
== FALSE
, "No unaligned address returned\n");