*** empty log message ***
[reactos.git] / reactos / lib / crtdll / stdlib / malloc.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/crtdll/stdlib/malloc.c
5 * PURPOSE: stdc memory allocation functions
6 * PROGRAMMER: ??
7 */
8
9 /* INCLUDES ******************************************************************/
10
11 #include <windows.h>
12 #include <types.h>
13
14 /* FUNCTIONS *****************************************************************/
15
16 void* malloc(size_t size)
17 {
18 return(HeapAlloc(GetProcessHeap(), 0, size));
19 }
20
21 void free(void* ptr)
22 {
23 HeapFree(GetProcessHeap(), 0, ptr);
24 }
25
26 void* calloc(size_t nmemb, size_t size)
27 {
28 return(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nmemb*size));
29 }
30
31 void* realloc(void* ptr, size_t size)
32 {
33 return(HeapReAlloc(GetProcessHeap(), 0, ptr, size));
34 }