mblock stat type: int to int64_t

pull/37/head
YuQing 2020-03-30 18:44:34 +08:00
parent 0810cb4d21
commit 46da99bbba
2 changed files with 8 additions and 7 deletions

View File

@ -262,7 +262,7 @@ int fast_mblock_manager_stat_print_ex(const bool hide_empty, const int order_by)
{
if (pStat->trunk_total_count > 0)
{
amem = pStat->trunk_size * pStat->trunk_total_count;
amem = (int64_t)pStat->trunk_size * pStat->trunk_total_count;
alloc_mem += amem;
used_mem += GET_BLOCK_SIZE(*pStat) *
pStat->element_used_count;
@ -278,7 +278,8 @@ int fast_mblock_manager_stat_print_ex(const bool hide_empty, const int order_by)
}
}
logInfo("%20s %8d %8d %12"PRId64" %10d %10d %10d %10d %10d %11.2f%%",
logInfo("%20s %8d %8d %12"PRId64" %10"PRId64" %10"PRId64
" %10"PRId64" %10"PRId64" %10"PRId64" %11.2f%%",
pStat->name, pStat->element_size, pStat->instance_count,
amem, pStat->trunk_total_count, pStat->trunk_used_count,
pStat->element_total_count, pStat->element_used_count,

View File

@ -57,13 +57,13 @@ struct fast_mblock_info
{
char name[FAST_MBLOCK_NAME_SIZE];
int element_size; //element size
int element_total_count; //total element count
int element_used_count; //used element count
int delay_free_elements; //delay free element count
int trunk_size; //trunk size
int trunk_total_count; //total trunk count
int trunk_used_count; //used trunk count
int instance_count; //instance count
int64_t element_total_count; //total element count
int64_t element_used_count; //used element count
int64_t delay_free_elements; //delay free element count
int64_t trunk_total_count; //total trunk count
int64_t trunk_used_count; //used trunk count
};
struct fast_mblock_trunks