ReactOS
0.4.17-dev-357-ga8f14ff
realloc.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS CRT heap support library
3
* LICENSE: MIT (https://spdx.org/licenses/MIT)
4
* PURPOSE: Implementation of realloc
5
* COPYRIGHT: Copyright 2026 Timo Kreuzer <timo.kreuzer@reactos.org>
6
*/
7
8
#include <malloc.h>
9
#include <
windef.h
>
10
#include <
winbase.h
>
11
12
void
*
__cdecl
realloc
(
void
* Block,
size_t
Size
)
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
}
realloc
#define realloc
Definition:
debug_ros.c:6
NULL
#define NULL
Definition:
types.h:112
GetProcessHeap
#define GetProcessHeap()
Definition:
compat.h:736
HeapAlloc
#define HeapAlloc
Definition:
compat.h:733
HeapReAlloc
#define HeapReAlloc
Definition:
compat.h:734
HeapFree
#define HeapFree(x, y, z)
Definition:
compat.h:735
__cdecl
#define __cdecl
Definition:
corecrt.h:121
Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition:
wdfdevice.h:4539
winbase.h
windef.h
sdk
lib
crtheap
realloc.c
Generated on Mon Jun 22 2026 06:19:39 for ReactOS by
1.9.6