sysinfo, procfs: Support memory info partially
Change-Id: I597dae4f82d64d3f23889cef960db18ae879ff06 refs: #1389
This commit is contained in:
committed by
Masamichi Takagi
parent
8e42c2a254
commit
8f74888f87
@@ -69,6 +69,24 @@ rusage_total_memory_add(unsigned long size)
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
rusage_get_total_memory()
|
||||
{
|
||||
return rusage.total_memory;
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
rusage_get_free_memory()
|
||||
{
|
||||
return rusage.total_memory - rusage.total_memory_usage;
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
rusage_get_usage_memory()
|
||||
{
|
||||
return rusage.total_memory_usage;
|
||||
}
|
||||
|
||||
static inline void
|
||||
rusage_rss_add(unsigned long size)
|
||||
{
|
||||
@@ -412,6 +430,24 @@ rusage_rss_add(unsigned long size)
|
||||
{
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
rusage_get_total_memory()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
rusage_get_free_memory()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
rusage_get_usage_memory()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
rusage_rss_sub(unsigned long size)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user