reactos/reactos/lib/crtdll/stdlib/malloc.c
David Welch 02e3d7b08e *** empty log message ***
svn path=/trunk/; revision=143
1999-01-01 22:03:17 +00:00

34 lines
791 B
C

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/crtdll/stdlib/malloc.c
* PURPOSE: stdc memory allocation functions
* PROGRAMMER: ??
*/
/* INCLUDES ******************************************************************/
#include <windows.h>
#include <types.h>
/* FUNCTIONS *****************************************************************/
void* malloc(size_t size)
{
return(HeapAlloc(GetProcessHeap(), 0, size));
}
void free(void* ptr)
{
HeapFree(GetProcessHeap(), 0, ptr);
}
void* calloc(size_t nmemb, size_t size)
{
return(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nmemb*size));
}
void* realloc(void* ptr, size_t size)
{
return(HeapReAlloc(GetProcessHeap(), 0, ptr, size));
}