Module: kamailio Branch: master Commit: 3640d634a457c000b5a643f569719186ac5dc982 URL: https://github.com/kamailio/kamailio/commit/3640d634a457c000b5a643f569719186ac5dc982
Author: Camille Oudot <[email protected]> Committer: Camille Oudot <[email protected]> Date: 2015-04-22T18:49:19+02:00 mem: TLSF: fix typo + missing declaration --- Modified: mem/tlsf.c Modified: mem/tlsf.h --- Diff: https://github.com/kamailio/kamailio/commit/3640d634a457c000b5a643f569719186ac5dc982.diff Patch: https://github.com/kamailio/kamailio/commit/3640d634a457c000b5a643f569719186ac5dc982.patch --- diff --git a/mem/tlsf.c b/mem/tlsf.c index d2f577e..3b494d0 100644 --- a/mem/tlsf.c +++ b/mem/tlsf.c @@ -912,6 +912,7 @@ tlsf_t tlsf_create(void* mem) tlsf_cast(control_t*, mem)->allocated = 0; tlsf_cast(control_t*, mem)->total_size = tlsf_size(); tlsf_cast(control_t*, mem)->fragments = 0; + tlsf_cast(control_t*, mem)->max_fragments = 0; #endif return tlsf_cast(tlsf_t, mem); } @@ -1106,7 +1107,7 @@ void tlsf_meminfo(tlsf_t pool, struct mem_info *info) memset(info, 0, sizeof(*info)); info->free = control->total_size - control->real_used; info->max_used = control->max_used; - info->real_used = control->max_used; + info->real_used = control->real_used; info->total_frags = control->fragments; info->used = control->allocated; info->total_size = control->total_size; diff --git a/mem/tlsf.h b/mem/tlsf.h index 24b4eeb..8826807 100644 --- a/mem/tlsf.h +++ b/mem/tlsf.h @@ -64,6 +64,7 @@ int tlsf_check(tlsf_t tlsf); int tlsf_check_pool(pool_t pool); void tlsf_meminfo(tlsf_t pool, struct mem_info *info); +size_t tlsf_available(tlsf_t pool); #if defined(__cplusplus) }; _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
