ReactOS 0.4.17-dev-357-ga8f14ff
realloc.c File Reference
#include <malloc.h>
#include <windef.h>
#include <winbase.h>
Include dependency graph for realloc.c:

Go to the source code of this file.

Functions

void *__cdecl realloc (void *Block, size_t Size)
 

Function Documentation

◆ realloc()

void *__cdecl realloc ( void Block,
size_t  Size 
)

Definition at line 12 of file realloc.c.

13{
14 if (Block == NULL)
15 return HeapAlloc(GetProcessHeap(), 0, Size);
16
17 if (Size != 0)
18 return HeapReAlloc(GetProcessHeap(), 0, Block, Size);
19
20 HeapFree(GetProcessHeap(), 0, Block);
21
22 return NULL;
23}
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapReAlloc
Definition: compat.h:734
#define HeapFree(x, y, z)
Definition: compat.h:735
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539