Release 960114
[wine/gsoc-2012-control.git] / win32 / heap.c
blob7a4468fbab1be528dbc0f170c7b9edb816aac6d7
1 /*
2 * Win32 kernel functions
4 * Copyright 1995 Thomas Sandford <t.d.g.sandford@prds-grn.demon.co.uk>
5 */
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <string.h>
10 #include <sys/time.h>
11 #include <unistd.h>
12 #include <sys/mman.h>
13 #include "windows.h"
14 #include "winerror.h"
15 #include "kernel32.h"
16 #include "winbase.h"
17 #include "stddebug.h"
18 #include "debug.h"
20 #define HEAP_ZERO_MEMORY 0x8
22 /* FIXME: these functions do *not* implement the win32 API properly. They
23 are here merely as "get you going" aids */
25 /***********************************************************************
26 * HeapAlloc (KERNEL32.222)
29 LPVOID HeapAlloc(HANDLE hHeap, DWORD dwFlags, DWORD dwBytes)
32 void *result;
34 result = malloc(dwBytes);
35 if(result && (dwFlags & HEAP_ZERO_MEMORY))
36 memset(result, 0, dwBytes);
37 return result;