33#define MAGIC_DEAD 0xdeadbeef
36#define HEAP_PAGE_ALLOCS 0x01000000
37#define HEAP_VALIDATE 0x10000000
38#define HEAP_VALIDATE_ALL 0x20000000
39#define HEAP_VALIDATE_PARAMS 0x40000000
56 return max(dwSizeAligned, 12);
64 ok(
buf[0] == 0,
"buffer not zeroed\n");
74 ok(
buf[0] == 0,
"buffer not zeroed\n");
77 ok(
buf[nbytes2-1] == 0,
"buffer not zeroed\n");
101 ok(
mem !=
NULL,
"memory not allocated for size 0\n");
105 ok(
mem ==
NULL,
"memory allocated by HeapReAlloc\n");
113 "HeapSize returned %lu instead of %lu or %lu\n", heap_size,
size,
resize_9x(
size));
119 ok(
mem !=
NULL,
"memory not allocated for size 0\n");
121 ok(msecond ==
NULL,
"HeapReAlloc(~0 - 7) should have failed\n");
123 ok(msecond ==
NULL,
"HeapReAlloc(~0) should have failed\n");
126 ok(
mem ==
NULL,
"memory allocated for size ~0\n");
129 ok(msecond !=
NULL,
"HeapReAlloc(0) should have succeeded\n");
132 "HeapSize should have returned 0 instead of %lu\n",
size);
137 ok(
mem !=
NULL,
"failed for size 512K\n" );
139 "512K block not 16-byte aligned\n" );
144 ok(gbl !=
NULL,
"global memory not allocated for size 0\n");
147 ok(gbl !=
NULL,
"Can't realloc global memory\n");
149 ok(
size >= 10 &&
size <= 16,
"Memory not resized to size 10, instead size=%ld\n",
size);
152 ok(gbl !=
NULL,
"GlobalReAlloc should not fail on size 0\n");
155 ok(
size == 0,
"Memory not resized to size 0, instead size=%ld\n",
size);
158 ok(
size == 0,
"Memory should have been freed, size=%ld\n",
size);
161 ok(gbl ==
NULL,
"global realloc allocated memory\n");
171 ok(
flags == 1,
"returned 0x%04x with %d (expected '0x0001')\n",
176 ok( msecond ==
mem,
"returned %p with %d (expected '%p')\n",
180 ok(
flags == 2,
"returned 0x%04x with %d (expected '0x0002')\n",
189 ok(
flags ,
"returned 0x%04x with %d (expected '!= 0')\n",
196 "returned %d with %d (expected '0' with: ERROR_SUCCESS or "
200 ok( !
flags ,
"returned 0x%04x with %d (expected '0')\n",
209 "returned %d with %d (expected '0' with: ERROR_NOT_LOCKED or "
217 "returned %p with 0x%08x (expected %p with ERROR_INVALID_HANDLE)\n",
222 "returned %p with 0x%08x (expected %p with ERROR_INVALID_HANDLE)\n",
228 "returned %p with 0x%08x (expected %p with ERROR_NOACCESS)\n",
234 "returned 0x%04x with 0x%08x (expected GMEM_INVALID_HANDLE with "
239 "returned %ld with 0x%08x (expected '0' with ERROR_INVALID_HANDLE)\n",
245 "returned %p with 0x%08x (expected NULL with ERROR_INVALID_HANDLE)\n",
255 "returned %d with %d (expected ERROR_INVALID_HANDLE)\n",
265 if (
sizeof(
void *) != 8)
273 "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
282 "got %p with %x (expected %p or NULL) @%ld\n", hsecond,
GetLastError(), gbl,
size);
292 "got %p with %x (expected non-NULL) @%ld\n", hsecond,
GetLastError(),
size);
294 ok(
mem == hsecond,
"got %p (expected %p) @%ld\n",
mem, hsecond,
size);
303 "Expected 1 or 0, got %d\n",
res);
308 "Expected 1 or 0, got %d\n",
res);
318 "Expected 1 or 0, got %d\n",
res);
324 if (
sizeof(
void *) != 8)
331 "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
343 ok(gbl !=
NULL,
"local memory not allocated for size 0\n");
346 ok(gbl !=
NULL,
"Can't realloc local memory\n");
348 ok(
size >= 10 &&
size <= 16,
"Memory not resized to size 10, instead size=%ld\n",
size);
351 ok(gbl !=
NULL,
"LocalReAlloc should not fail on size 0\n");
354 ok(
size == 0,
"Memory not resized to size 0, instead size=%ld\n",
size);
357 ok(
size == 0,
"Memory should have been freed, size=%ld\n",
size);
360 ok(gbl ==
NULL,
"local realloc allocated memory\n");
369 ok(
flags == 1,
"returned 0x%04x with %d (expected '0x0001')\n",
374 ok( msecond ==
mem,
"returned %p with %d (expected '%p')\n",
378 ok(
flags == 2,
"returned 0x%04x with %d (expected '0x0002')\n",
387 ok(
flags ,
"returned 0x%04x with %d (expected '!= 0')\n",
394 "returned %d with %d (expected '0' with: ERROR_SUCCESS or "
398 ok( !
flags ,
"returned 0x%04x with %d (expected '0')\n",
407 "returned %d with %d (expected '0' with: ERROR_NOT_LOCKED or "
415 "returned %p with 0x%08x (expected %p with ERROR_INVALID_HANDLE)\n",
420 "returned 0x%04x with 0x%08x (expected LMEM_INVALID_HANDLE with "
425 "returned %ld with 0x%08x (expected '0' with ERROR_INVALID_HANDLE)\n",
431 "returned %p with 0x%08x (expected NULL with ERROR_INVALID_HANDLE)\n",
438 "returned %d with %d (expected '0' with ERROR_INVALID_HANDLE)\n",
447 "got %p with %x (expected %p or NULL) @%ld\n", hsecond,
GetLastError(), gbl,
size);
457 "got %p with %x (expected non-NULL) @%ld\n", hsecond,
GetLastError(),
size);
459 ok(
mem == hsecond,
"got %p (expected %p) @%ld\n",
mem, hsecond,
size);
467 ok(
res == 0,
"Expected 0, got %d\n",
res);
476 "wrong size %lu\n",
size );
481 ok(gbl !=
NULL,
"returned NULL\n");
487 "returned %p with 0x%x/%d (expected 'NULL' with: ERROR_DISCARDED or "
494 ok(gbl !=
NULL,
"returned NULL\n");
497 ok(gbl !=
mem,
"unexpectedly equal.\n");
502 ok(size2 == 0x123,
"got %lu\n", size2);
508 ok(gbl !=
NULL,
"returned NULL\n");
511 ok(gbl ==
mem,
"got %p, %p.\n", gbl,
mem);
537 ok(sysInfo.
dwPageSize>0,
"GetSystemInfo should return a valid page size\n");
552 ok(mem1==
NULL,
"HeapCreate allocated more Ram than it should have\n");
557 ok(mem1!=
NULL,
"HeapAlloc failed\n");
559 ok(
HeapSize(
heap,0,mem1)>=memchunk,
"HeapAlloc should return a big enough memory block\n");
564 ok(mem2!=
NULL,
"HeapAlloc failed\n");
566 ok(
HeapSize(
heap,0,mem2)>=memchunk,
"HeapAlloc should return a big enough memory block\n");
568 for(
i=0;
i<memchunk;
i++) {
573 ok(!
error,
"HeapAlloc should have zeroed out its allocated memory\n");
578 ok(mem3==
NULL,
"HeapAlloc should return NULL\n");
585 ok(mem2a!=
NULL,
"HeapReAlloc failed\n");
590 if(mem2a[memchunk+
i]!=0) {
594 ok(!
error,
"HeapReAlloc should have zeroed out its allocated memory\n");
605 ok(mem1a==
NULL || !
error,
"HeapReAlloc didn't honour HEAP_REALLOC_IN_PLACE_ONLY\n");
621 ok(mem1 !=
NULL,
"Reserved memory\n");
625 ok(
dwSize < 0xFFFFFFFF,
"The size of the 0-length buffer\n");
645 ok(mem1!=
NULL,
"GlobalAlloc failed\n");
647 ok(
GlobalSize(mem1)>=memchunk,
"GlobalAlloc should return a big enough memory block\n");
654 ok(
GlobalSize(mem2)>=memchunk,
"GlobalAlloc should return a big enough memory block\n");
656 ok(mem2ptr==mem2,
"GlobalLock should have returned the same memory as was allocated\n");
659 for(
i=0;
i<memchunk;
i++) {
664 ok(!
error,
"GlobalAlloc should have zeroed out its allocated memory\n");
674 "Converting from FIXED to MOVEABLE didn't REALLY work\n");
679 ok(mem2a!=
NULL,
"GlobalReAlloc failed\n");
681 ok(
GlobalSize(mem2a)>=2*memchunk,
"GlobalReAlloc failed\n");
683 ok(mem2ptr!=
NULL,
"GlobalLock Failed\n");
686 for(
i=0;
i<memchunk;
i++) {
687 if(mem2ptr[memchunk+
i]!=0) {
691 ok(!
error,
"GlobalReAlloc should have zeroed out its allocated memory\n");
695 ok(mem2b==mem2a,
"GlobalHandle didn't return the correct memory handle %p/%p for %p\n",
696 mem2a, mem2b, mem2ptr);
718 HLOCAL mem1,mem2,mem2a,mem2b;
728 ok(
LocalSize(mem1)>=memchunk,
"LocalAlloc should return a big enough memory block\n");
735 ok(
LocalSize(mem2)>=memchunk,
"LocalAlloc should return a big enough memory block\n");
740 for(
i=0;
i<memchunk;
i++) {
745 ok(!
error,
"LocalAlloc should have zeroed out its allocated memory\n");
753 ok(mem2a==
NULL,
"LocalFree failed: %p\n",mem2a);
757 ok(mem2!=
NULL,
"LocalAlloc failed to create moveable memory, error=%d\n",
GetLastError());
763 ok(
LocalSize(mem2a)>=2*memchunk,
"LocalReAlloc failed\n");
765 ok(mem2ptr!=
NULL,
"LocalLock Failed\n");
768 for(
i=0;
i<memchunk;
i++) {
769 if(mem2ptr[memchunk+
i]!=0) {
773 ok(!
error,
"LocalReAlloc should have zeroed out its allocated memory\n");
776 ok(mem2b==mem2a,
"LocalHandle didn't return the correct memory handle %p/%p for %p\n",
777 mem2a, mem2b, mem2ptr);
780 ok(mem2b==
NULL,
"Discarded memory we shouldn't have\n");
800 } test_global_flags[] = {
822 win_skip(
"GlobalFlags is not available\n");
826 for (
i = 0;
i <
sizeof(test_global_flags)/
sizeof(test_global_flags[0]);
i++)
829 ok(gbl !=
NULL,
"GlobalAlloc failed\n");
832 resultflags = pGlobalFlags(gbl);
834 ok( resultflags == test_global_flags[
i].globalflags ||
836 "%u: expected 0x%08x, but returned 0x%08x with %d\n",
837 i, test_global_flags[
i].globalflags, resultflags,
GetLastError() );
850 if (!pHeapQueryInformation)
852 win_skip(
"HeapQueryInformation is not available\n");
859 pHeapQueryInformation(0,
873 ok(!
ret,
"HeapQueryInformation should fail\n");
875 "expected ERROR_INSUFFICIENT_BUFFER got %u\n",
GetLastError());
882 ok(!
ret,
"HeapQueryInformation should fail\n");
884 "expected ERROR_INSUFFICIENT_BUFFER got %u\n",
GetLastError());
905 ok(
p !=
NULL,
"HeapAlloc failed\n" );
908 ok(
ret,
"HeapValidate failed\n" );
913 ok(
p[14] == 0,
"wrong data %x\n",
p[14] );
914 ok(
p[15] == 0,
"wrong data %x\n",
p[15] );
915 ok(
p[16] == 0,
"wrong data %x\n",
p[16] );
919 ok(
p[17] == 0xab,
"wrong padding %x\n",
p[17] );
920 ok(
p[18] == 0xab,
"wrong padding %x\n",
p[18] );
921 ok(
p[19] == 0xab,
"wrong padding %x\n",
p[19] );
929 ok(
p[14] == 0xab,
"wrong padding %x\n",
p[14] );
930 ok(
p[15] == 0xab,
"wrong padding %x\n",
p[15] );
931 ok(
p[16] == 0xab,
"wrong padding %x\n",
p[16] );
935 ok(
p[14] == 0,
"wrong padding %x\n",
p[14] );
936 ok(
p[15] == 0,
"wrong padding %x\n",
p[15] );
939 else skip(
"realloc in place failed\n");
942 ok(
ret,
"HeapFree failed\n" );
945 ok(
p !=
NULL,
"HeapAlloc failed\n" );
952 ok( !
ret,
"HeapValidate succeeded\n" );
961 ok( p2 ==
NULL,
"HeapReAlloc succeeded\n" );
965 "HeapFree succeeded\n" );
973 ok( p2 !=
NULL,
"HeapReAlloc failed\n" );
978 ok(
ret,
"HeapFree failed\n" );
981 ok(
p !=
NULL,
"HeapAlloc failed\n" );
985 ok(
ret,
"HeapFree failed\n" );
989 ok(
p[16] == 0xee,
"wrong data %x\n",
p[16] );
990 ok(
p[17] == 0xfe,
"wrong data %x\n",
p[17] );
991 ok(
p[18] == 0xee,
"wrong data %x\n",
p[18] );
992 ok(
p[19] == 0xfe,
"wrong data %x\n",
p[19] );
995 ok(
ret,
"HeapValidate failed\n" );
1000 ok( !
ret,
"HeapValidate succeeded\n" );
1004 ok(
ret,
"HeapValidate failed\n" );
1010 ok(
p !=
NULL,
"HeapAlloc failed\n" );
1013 ok(
ret,
"HeapValidate failed\n" );
1016 ok(
size == large_size,
"Wrong size %lu\n",
size );
1018 ok(
p[large_size - 2] == 0,
"wrong data %x\n",
p[large_size - 2] );
1019 ok(
p[large_size - 1] == 0,
"wrong data %x\n",
p[large_size - 1] );
1024 ok(
p[large_size] == 0xab ||
broken(
p[large_size] == 0),
"wrong data %x\n",
p[large_size] );
1025 ok(
p[large_size+1] == 0xab ||
broken(
p[large_size+1] == 0),
"wrong data %x\n",
p[large_size+1] );
1026 ok(
p[large_size+2] == 0xab ||
broken(
p[large_size+2] == 0),
"wrong data %x\n",
p[large_size+2] );
1027 if (
p[large_size] == 0xab)
1029 p[large_size] = 0xcc;
1031 ok( !
ret,
"HeapValidate succeeded\n" );
1040 ok( p2 ==
NULL,
"HeapReAlloc succeeded\n" );
1043 ok( !
ret,
"HeapFree succeeded\n" );
1045 p[large_size] = 0xab;
1050 ok(
ret,
"HeapFree failed\n" );
1058 for (
i = 0;
i < 32;
i++)
if (
p[
size +
i] != 0xab)
break;
1059 ok(
i >= 8,
"only %lu tail bytes for size %lu\n",
i,
size );
1079 sprintf( keyname,
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\%s",
1081 if (!
strcmp( keyname +
strlen(keyname) - 3,
".so" )) keyname[
strlen(keyname) - 3] = 0;
1086 skip(
"Not authorized to change the image file execution options\n");
1089 ok( !
err,
"failed to create '%s' error %u\n", keyname,
err );
1092 if (
flags == 0xdeadbeef)
1156 if (
expected && !pRtlGetNtGlobalFlags())
1158 win_skip(
"global flags not set\n" );
1163 "%s: got global flags %08x expected %08x\n",
arg, pRtlGetNtGlobalFlags(),
expected );
1171 else if (
heap->pattern == 0xeeeeeeee &&
heap->flags == 0xeeeeeeee)
1178 "%s: got heap flags %08x expected %08x\n",
arg,
heap->flags, expect_heap );
1179 ok(
heap->force_flags == (expect_heap & ~0x18000080),
1180 "%s: got heap force flags %08x expected %08x\n",
arg,
heap->force_flags, expect_heap );
1181 expect_heap =
heap->flags;
1190 MEMORYSTATUSEX memstatus;
1194 pGetPhysicallyInstalledSystemMemory = (
void *)
GetProcAddress(kernel32,
"GetPhysicallyInstalledSystemMemory");
1195 if (!pGetPhysicallyInstalledSystemMemory)
1197 win_skip(
"GetPhysicallyInstalledSystemMemory is not available\n");
1202 ret = pGetPhysicallyInstalledSystemMemory(
NULL);
1203 ok(!
ret,
"GetPhysicallyInstalledSystemMemory should fail\n");
1205 "expected ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
1208 ret = pGetPhysicallyInstalledSystemMemory(&total_memory);
1209 ok(
ret,
"GetPhysicallyInstalledSystemMemory unexpectedly failed\n");
1210 ok(total_memory != 0,
"expected total_memory != 0\n");
1212 memstatus.dwLength =
sizeof(memstatus);
1214 ok(
ret,
"GlobalMemoryStatusEx unexpectedly failed\n");
1215 ok(total_memory >= memstatus.ullTotalPhys / 1024,
1216 "expected total_memory >= memstatus.ullTotalPhys / 1024\n");
1250 if (pRtlGetNtGlobalFlags)
1264 else win_skip(
"RtlGetNtGlobalFlags not found, skipping heap debug tests\n" );
int strcmp(const char *String1, const char *String2)
UINT32 strtoul(const char *String, char **Terminator, UINT32 Base)
ACPI_SIZE strlen(const char *String)
static void startup(void)
#define RegCloseKey(hKey)
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define ERROR_ACCESS_DENIED
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
static void basename(LPCWSTR path, LPWSTR name)
GLuint GLuint GLsizei GLenum type
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
HGLOBAL NTAPI GlobalHandle(LPCVOID pMem)
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
HANDLE WINAPI HeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
HGLOBAL NTAPI GlobalReAlloc(HGLOBAL hMem, SIZE_T dwBytes, UINT uFlags)
UINT NTAPI GlobalFlags(HGLOBAL hMem)
HLOCAL NTAPI LocalReAlloc(HLOCAL hMem, SIZE_T dwBytes, UINT uFlags)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
LPVOID NTAPI LocalLock(HLOCAL hMem)
BOOL NTAPI LocalUnlock(HLOCAL hMem)
BOOL WINAPI HeapValidate(HANDLE hHeap, DWORD dwFlags, LPCVOID lpMem)
BOOL WINAPI HeapDestroy(HANDLE hHeap)
SIZE_T NTAPI LocalSize(HLOCAL hMem)
HLOCAL NTAPI LocalHandle(LPCVOID pMem)
UINT NTAPI LocalFlags(HLOCAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
BOOL NTAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX lpBuffer)
#define FLG_HEAP_DISABLE_COALESCING
#define FLG_HEAP_ENABLE_TAGGING
#define FLG_HEAP_PAGE_ALLOCS
#define FLG_POOL_ENABLE_TAGGING
#define FLG_HEAP_ENABLE_FREE_CHECK
#define FLG_HEAP_VALIDATE_PARAMETERS
#define FLG_HEAP_ENABLE_TAIL_CHECK
#define FLG_HEAP_VALIDATE_ALL
#define FLG_HEAP_ENABLE_TAG_BY_DLL
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define sprintf(buf, format,...)
static HEAP_INFORMATION_CLASS
static void test_GetPhysicallyInstalledSystemMemory(void)
static void test_child_heap(const char *arg)
static SIZE_T resize_9x(SIZE_T size)
static void test_heap(void)
static void test_GlobalAlloc(void)
static void test_LocalAlloc(void)
static void test_debug_heap(const char *argv0, DWORD flags)
static DWORD heap_flags_from_global_flag(DWORD flag)
static void test_heap_checks(DWORD flags)
#define HEAP_VALIDATE_PARAMS
#define HEAP_VALIDATE_ALL
static void test_sized_HeapReAlloc(int nbytes1, int nbytes2)
static void test_HeapCreate(void)
static void test_HeapQueryInformation(void)
static void test_sized_HeapAlloc(int nbytes)
static void test_obsolete_flags(void)
@ HeapCompatibilityInformation
#define HEAP_FREE_CHECKING_ENABLED
#define HEAP_DISABLE_COALESCE_ON_FREE
#define HEAP_TAIL_CHECKING_ENABLED
#define HEAP_REALLOC_IN_PLACE_ONLY
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
int winetest_get_mainargs(char ***pargv)
void winetest_wait_child_process(HANDLE process)
static char argv0[MAX_PATH]
#define success(from, fromstr, to, tostr)
SIZE_T WINAPI HeapSize(HANDLE, DWORD, LPCVOID)
DWORD WINAPI GetLastError(void)
#define GMEM_INVALID_HANDLE
#define LMEM_INVALID_HANDLE
#define HKEY_LOCAL_MACHINE