зеркало из https://github.com/mozilla/pjs.git
Bug 206630 - Add AIX support for memory cache based on physical ram
(originally implemented in Bug 105344) r=gordon@netscape.com, sr=darin@netscape.com, a=mkaply@us.ibm.com
This commit is contained in:
Родитель
090e7af46b
Коммит
42e059ae1d
|
@ -98,6 +98,10 @@ EXTRA_DSO_LDOPTS += \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(OS_ARCH),AIX)
|
||||||
|
EXTRA_DSO_LDOPTS += -lodm -lcfg
|
||||||
|
endif
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
ifeq ($(OS_ARCH),WINNT)
|
ifeq ($(OS_ARCH),WINNT)
|
||||||
|
|
|
@ -1269,6 +1269,9 @@ nsCacheService::SetMemoryCacheCapacity(PRInt32 capacity)
|
||||||
#include <os2.h>
|
#include <os2.h>
|
||||||
#elif defined(XP_WIN)
|
#elif defined(XP_WIN)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#elif defined(_AIX)
|
||||||
|
#include <cf.h>
|
||||||
|
#include <sys/cfgodm.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -1326,6 +1329,19 @@ nsCacheService::CacheMemoryAvailable()
|
||||||
sizeof(ulPhysMem));
|
sizeof(ulPhysMem));
|
||||||
kbytes = (long)(ulPhysMem / 1024);
|
kbytes = (long)(ulPhysMem / 1024);
|
||||||
|
|
||||||
|
#elif defined(_AIX)
|
||||||
|
|
||||||
|
int how_many;
|
||||||
|
struct CuAt *obj;
|
||||||
|
if (odm_initialize() == 0) {
|
||||||
|
obj = getattr("sys0", "realmem", 0, &how_many);
|
||||||
|
if (obj != NULL) {
|
||||||
|
kbytes = atoi(obj->value);
|
||||||
|
free(obj);
|
||||||
|
}
|
||||||
|
odm_terminate();
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
return MEMORY_CACHE_CAPACITY;
|
return MEMORY_CACHE_CAPACITY;
|
||||||
#endif
|
#endif
|
||||||
|
|
Загрузка…
Ссылка в новой задаче