kernel/vm: Fix build with swap support disabled.
The rename of the system_info members was missed in
d02aaee17e
(part of the scheduler branch
merge of hrev46690). The unguarded object_cache was introduced even
earlier as part of hrev43133.
This commit is contained in:
parent
31cee26cfe
commit
146630e096
@ -1755,8 +1755,8 @@ swap_get_info(system_info* info)
|
||||
info->max_swap_pages = swap_total_swap_pages();
|
||||
info->free_swap_pages = swap_available_pages();
|
||||
#else
|
||||
info->max_swap_space = 0;
|
||||
info->free_swap_space = 0;
|
||||
info->max_swap_pages = 0;
|
||||
info->free_swap_pages = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,9 @@ static mutex sCacheListLock = MUTEX_INITIALIZER("global VMCache list");
|
||||
// The lock is also needed when the debug feature is disabled.
|
||||
|
||||
ObjectCache* gCacheRefObjectCache;
|
||||
#if ENABLE_SWAP_SUPPORT
|
||||
ObjectCache* gAnonymousCacheObjectCache;
|
||||
#endif
|
||||
ObjectCache* gAnonymousNoSwapCacheObjectCache;
|
||||
ObjectCache* gVnodeCacheObjectCache;
|
||||
ObjectCache* gDeviceCacheObjectCache;
|
||||
@ -505,8 +507,10 @@ vm_cache_init(kernel_args* args)
|
||||
// Create object caches for the structures we allocate here.
|
||||
gCacheRefObjectCache = create_object_cache("cache refs", sizeof(VMCacheRef),
|
||||
0, NULL, NULL, NULL);
|
||||
#if ENABLE_SWAP_SUPPORT
|
||||
gAnonymousCacheObjectCache = create_object_cache("anon caches",
|
||||
sizeof(VMAnonymousCache), 0, NULL, NULL, NULL);
|
||||
#endif
|
||||
gAnonymousNoSwapCacheObjectCache = create_object_cache(
|
||||
"anon no-swap caches", sizeof(VMAnonymousNoSwapCache), 0, NULL, NULL,
|
||||
NULL);
|
||||
@ -517,7 +521,10 @@ vm_cache_init(kernel_args* args)
|
||||
gNullCacheObjectCache = create_object_cache("null caches",
|
||||
sizeof(VMNullCache), 0, NULL, NULL, NULL);
|
||||
|
||||
if (gCacheRefObjectCache == NULL || gAnonymousCacheObjectCache == NULL
|
||||
if (gCacheRefObjectCache == NULL
|
||||
#if ENABLE_SWAP_SUPPORT
|
||||
|| gAnonymousCacheObjectCache == NULL
|
||||
#endif
|
||||
|| gAnonymousNoSwapCacheObjectCache == NULL
|
||||
|| gVnodeCacheObjectCache == NULL
|
||||
|| gDeviceCacheObjectCache == NULL
|
||||
|
Loading…
Reference in New Issue
Block a user