网站首页  词典首页

请输入您要查询的函数:

 

术语 setsystemfilecachesize
释义 SetSystemFileCacheSize
语法:
C++
BOOL WINAPI SetSystemFileCacheSize(
__in SIZE_T MinimumFileCacheSize,
__in SIZE_T MaximumFileCacheSize,
__in DWORD Flags
);
SetSystemFileCacheSize功能
限制了工作文件系统缓存集的大小。
参数
MinimumFileCacheSize [in]
该文件的缓存的最小大小,以字节为单位。虚拟内存管理器试图将至少这在系统文件缓存的内存居民。
要刷新缓存,指定(SIZE_T)-1。
MaximumFileCacheSize [in]
该文件缓存的最大大小,以字节为单位。虚拟内存管理器强制执行此限制仅当此电话或以前调用SetSystemFileCacheSize指定FILE_CACHE_MAX_HARD_ENABLE。
要刷新缓存,指定(SIZE_T)-1。
标志 [in]
该标志的启用或禁用文件缓存的限制。如果此参数为0(零),大小限制保留目前的设置,它已被禁用或启用。
ValueMeaning
FILE_CACHE_MAX_HARD_DISABLE
0x2Disable最大大小限制。
在FILE_CACHE_MAX_HARD_DISABLE和FILE_CACHE_MAX_HARD_ENABLE标志是互相排斥的。
FILE_CACHE_MAX_HARD_ENABLE
0x1Enable最大大小限制。
在FILE_CACHE_MAX_HARD_DISABLE和FILE_CACHE_MAX_HARD_ENABLE标志是互相排斥的。
FILE_CACHE_MIN_HARD_DISABLE
0x8Disable的最小尺寸限制。
在FILE_CACHE_MIN_HARD_DISABLE和FILE_CACHE_MIN_HARD_ENABLE标志是互相排斥的。
FILE_CACHE_MIN_HARD_ENABLE
0x4Enable的最小尺寸限制。
在FILE_CACHE_MIN_HARD_DISABLE和FILE_CACHE_MIN_HARD_ENABLE标志是互相排斥的。
返回值
如果函数成功,返回值是一个非零值。
如果函数失败,返回值为0(零)。为了获得更多错误信息,调用GetLastError。
备注
调用进程必须启用SE_INCREASE_QUOTA_NAME特权。
参数设置MaximumFileCacheSize到非常低的值可以影响系统性能。
要编译的应用程序使用此功能,定义_WIN32_WINNT为0x0502或更高版本。有关详细信息,请参阅使用Windows头。
该FILE_CACHE常量将被定义在Windows头文件与Windows Server 2008的Windows SDK的开始。如果您使用的是从一个早期版本的SDK头文件,添加以下定义您的代码。
#ifndef FILE_CACHE_FLAGS_DEFINED
#define FILE_CACHE_MAX_HARD_ENABLE 0x00000001
#define FILE_CACHE_MAX_HARD_DISABLE 0x00000002
#define FILE_CACHE_MIN_HARD_ENABLE 0x00000004
#define FILE_CACHE_MIN_HARD_DISABLE 0x00000008
#endif // FILE_CACHE_FLAGS_DEFINED

要求:
最低支持clientWindows Vista中,Windows XP Professional x64版本
最低支持serverWindows Server 2008中时,Windows Server 2003 SP1的
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
GetSystemFileCacheSize
内存管理功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==SetSystemFileCacheSize Function
Limits the size of the working set for the file system cache.
Syntax
C++
BOOL WINAPI SetSystemFileCacheSize(
__in SIZE_T MinimumFileCacheSize,
__in SIZE_T MaximumFileCacheSize,
__in DWORD Flags
);
Parameters
MinimumFileCacheSize [in]
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.
To flush the cache, specify (SIZE_T) -1.
MaximumFileCacheSize [in]
The maximum size of the file cache, in bytes. The virtual memory manager enforces this limit only if this call or a previous call to SetSystemFileCacheSize specifies FILE_CACHE_MAX_HARD_ENABLE.
To flush the cache, specify (SIZE_T) -1.
Flags [in]
The flags that enable or disable the file cache limits. If this parameter is 0 (zero), the size limits retain the current setting, which is either disabled or enabled.
ValueMeaning
FILE_CACHE_MAX_HARD_DISABLE
0x2Disable the maximum size limit.
The FILE_CACHE_MAX_HARD_DISABLE and FILE_CACHE_MAX_HARD_ENABLE flags are mutually exclusive.
FILE_CACHE_MAX_HARD_ENABLE
0x1Enable the maximum size limit.
The FILE_CACHE_MAX_HARD_DISABLE and FILE_CACHE_MAX_HARD_ENABLE flags are mutually exclusive.
FILE_CACHE_MIN_HARD_DISABLE
0x8Disable the minimum size limit.
The FILE_CACHE_MIN_HARD_DISABLE and FILE_CACHE_MIN_HARD_ENABLE flags are mutually exclusive.
FILE_CACHE_MIN_HARD_ENABLE
0x4Enable the minimum size limit.
The FILE_CACHE_MIN_HARD_DISABLE and FILE_CACHE_MIN_HARD_ENABLE flags are mutually exclusive.

Return Value
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
The calling process must enable the SE_INCREASE_QUOTA_NAME privilege.
Setting the MaximumFileCacheSize parameter to a very low value can adversely affect system performance.
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 following definitions to your code.
#ifndef FILE_CACHE_FLAGS_DEFINED
#define FILE_CACHE_MAX_HARD_ENABLE 0x00000001
#define FILE_CACHE_MAX_HARD_DISABLE 0x00000002
#define FILE_CACHE_MIN_HARD_ENABLE 0x00000004
#define FILE_CACHE_MIN_HARD_DISABLE 0x00000008
#endif // FILE_CACHE_FLAGS_DEFINED
Requirements
Minimum supported clientWindows Vista, Windows XP Professional x64 Edition
Minimum supported serverWindows Server 2008, Windows Server 2003 with SP1
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
GetSystemFileCacheSize
Memory Management Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa965240(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:18:23