ReactOS
0.4.16-dev-889-g9563c07
heapmin.cpp
Go to the documentation of this file.
1
//
2
// heapmin.cpp
3
//
4
// Copyright (c) Microsoft Corporation. All rights reserved.
5
//
6
// Implementation of _heapmin().
7
//
8
#include <
corecrt_internal.h
>
9
#include <malloc.h>
10
11
// Minimizes the heap, freeing as much memory as possible back to the OS.
12
// Returns 0 on success, -1 on failure.
13
extern
"C"
int
__cdecl
_heapmin
()
14
{
15
if
(!
HeapCompact
(
__acrt_heap
, 0))
16
return
-1;
17
18
return
0;
19
}
__cdecl
#define __cdecl
Definition:
accygwin.h:79
corecrt_internal.h
__acrt_heap
HANDLE __acrt_heap
Definition:
heap_handle.cpp:15
HeapCompact
SIZE_T WINAPI HeapCompact(HANDLE hHeap, DWORD dwFlags)
Definition:
heapmem.c:145
_heapmin
int __cdecl _heapmin()
Definition:
heapmin.cpp:13
sdk
lib
ucrt
heap
heapmin.cpp
Generated on Tue Mar 25 2025 06:14:49 for ReactOS by
1.9.6