Reactos
at master 19 lines 401 B view raw
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. 13extern "C" int __cdecl _heapmin() 14{ 15 if (!HeapCompact(__acrt_heap, 0)) 16 return -1; 17 18 return 0; 19}