Module: kamailio
Branch: master
Commit: fb8727b3e1b9fc4f4278809ef9cdea93e96ae77a
URL:
https://github.com/kamailio/kamailio/commit/fb8727b3e1b9fc4f4278809ef9cdea9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-03-04T09:44:21+01:00
kex: updated memory info fields
---
Modified: src/modules/kex/core_stats.c
Modified: src/modules/kex/pkg_stats.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fb8727b3e1b9fc4f4278809ef9cdea9…
Patch:
https://github.com/kamailio/kamailio/commit/fb8727b3e1b9fc4f4278809ef9cdea9…
---
diff --git a/src/modules/kex/core_stats.c b/src/modules/kex/core_stats.c
index ec543d1b60..565ce4e77d 100644
--- a/src/modules/kex/core_stats.c
+++ b/src/modules/kex/core_stats.c
@@ -869,7 +869,7 @@ unsigned long shm_stats_get_size(void)
unsigned long shm_stats_get_used(void)
{
stats_shm_update();
- return _stats_shm_rpc.used;
+ return _stats_shm_rpc.used_size;
}
unsigned long shm_stats_get_rused(void)
@@ -887,7 +887,7 @@ unsigned long shm_stats_get_mused(void)
unsigned long shm_stats_get_free(void)
{
stats_shm_update();
- return _stats_shm_rpc.free;
+ return _stats_shm_rpc.free_size;
}
unsigned long shm_stats_get_frags(void)
diff --git a/src/modules/kex/pkg_stats.c b/src/modules/kex/pkg_stats.c
index 102442f1e9..15ce1dcf2c 100644
--- a/src/modules/kex/pkg_stats.c
+++ b/src/modules/kex/pkg_stats.c
@@ -99,8 +99,8 @@ int pkg_proc_stats_myinit(int rank)
/* init pkg usage values */
pkg_info(&info);
- _pkg_proc_stats_list[process_no].available = info.free;
- _pkg_proc_stats_list[process_no].used = info.used;
+ _pkg_proc_stats_list[process_no].available = info.free_size;
+ _pkg_proc_stats_list[process_no].used = info.used_size;
_pkg_proc_stats_list[process_no].real_used = info.real_used;
_pkg_proc_stats_list[process_no].total_size = info.total_size;
_pkg_proc_stats_list[process_no].total_frags = info.total_frags;
@@ -132,8 +132,8 @@ static int pkg_proc_update_stats(sr_event_param_t *evp)
if(unlikely(process_no>=_pkg_proc_stats_no))
return -1;
pkg_info(&info);
- _pkg_proc_stats_list[process_no].available = info.free;
- _pkg_proc_stats_list[process_no].used = info.used;
+ _pkg_proc_stats_list[process_no].available = info.free_size;
+ _pkg_proc_stats_list[process_no].used = info.used_size;
_pkg_proc_stats_list[process_no].real_used = info.real_used;
_pkg_proc_stats_list[process_no].total_frags = info.total_frags;
return 0;