mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 09:28:58 +00:00
load_mon: remove usage of CONFIG_RAM_SIZE
The define should not be used, as it might be wrong. This is the case on fmu-v5, which meant that the used RAM was always 1.
This commit is contained in:
@@ -246,14 +246,7 @@ float LoadMon::_ram_used()
|
||||
// mem.fordblks: free (bytes)
|
||||
// mem.mxordblk: largest remaining block (bytes)
|
||||
|
||||
float load = (float)mem.uordblks / mem.arena;
|
||||
|
||||
// Check for corruption of the allocation counters
|
||||
if ((mem.arena > CONFIG_RAM_SIZE) || (mem.fordblks > CONFIG_RAM_SIZE)) {
|
||||
load = 1.0f;
|
||||
}
|
||||
|
||||
return load;
|
||||
return (float)mem.uordblks / mem.arena;
|
||||
#else
|
||||
return 0.0f;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user