Skip to content

Latest commit

 

History

History
126 lines (101 loc) · 4.34 KB

nf-memoryapi-getsystemfilecachesize.md

File metadata and controls

126 lines (101 loc) · 4.34 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:memoryapi.GetSystemFileCacheSize
GetSystemFileCacheSize function (memoryapi.h)
Retrieves the current size limits for the working set of the system cache.
FILE_CACHE_MAX_HARD_ENABLE
FILE_CACHE_MIN_HARD_ENABLE
GetSystemFileCacheSize
GetSystemFileCacheSize function
base.getsystemfilecachesize
winbase/GetSystemFileCacheSize
base\getsystemfilecachesize.htm
base
9a82e572-eab8-4096-a3b3-706ca6eb7a52
12/05/2018
FILE_CACHE_MAX_HARD_ENABLE, FILE_CACHE_MIN_HARD_ENABLE, GetSystemFileCacheSize, GetSystemFileCacheSize function, base.getsystemfilecachesize, winbase/GetSystemFileCacheSize
memoryapi.h
Windows.h, Memoryapi.h
Windows
Windows Vista, Windows XP Professional x64 Edition [desktop apps only]
Windows Server 2008, Windows Server 2003 with SP1 [desktop apps only]
onecore.lib
Kernel32.dll
Windows
19H1
GetSystemFileCacheSize
memoryapi/GetSystemFileCacheSize
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-memory-l1-1-1.dll
KernelBase.dll
API-MS-Win-Core-memory-l1-1-2.dll
API-MS-Win-Core-memory-l1-1-3.dll
API-MS-Win-DownLevel-Kernel32-l1-1-0.dll
MinKernelBase.dll
API-MS-Win-Core-Memory-L1-1-4.dll
GetSystemFileCacheSize

GetSystemFileCacheSize function

-description

Retrieves the current size limits for the working set of the system cache.

-parameters

-param lpMinimumFileCacheSize [out]

A pointer to a variable that receives the minimum size of the file cache, in bytes. The virtual memory manager attempts to keep at least this much memory resident in the system file cache, if there is a previous call to the SetSystemFileCacheSize function with the FILE_CACHE_MIN_HARD_ENABLE flag.

-param lpMaximumFileCacheSize [out]

A pointer to a variable that receives the maximum size of the file cache, in bytes. The virtual memory manager enforces this limit only if there is a previous call to SetSystemFileCacheSize with the FILE_CACHE_MAX_HARD_ENABLE flag.

-param lpFlags [out]

The flags that indicate which of the file cache limits are enabled.

Value Meaning
FILE_CACHE_MAX_HARD_ENABLE
0x1
The maximum size limit is enabled. If this flag is not present, this limit is disabled.
FILE_CACHE_MIN_HARD_ENABLE
0x4
The minimum size limit is enabled. If this flag is not present, this limit is disabled.

-returns

If the function succeeds, the return value is a nonzero value.

If the function fails, the return value is 0 (zero). To get extended error information, call GetLastError.

-remarks

To compile an application that uses this function, define _WIN32_WINNT as 0x0502 or later. For more information, see Using the Windows Headers.

The FILE_CACHE constants will be defined in the Windows header files starting with the Windows SDK for Windows Server 2008. If you are using header files from an earlier version of the SDK, add the definitions shown in SetSystemFileCacheSize to your code.

-see-also

Memory Management Functions

SetSystemFileCacheSize