microsoft / microsoft/mimalloc
[Question] Why does the total value decrease when the "_mi_stats_print" function is executed for each TLD?
- Dominant language
- C
- Stars
- 13.4k
- Forks
- 1.2k
- Avg merge
- 4d 45m
- Merged PRs (30d)
- 13
Description
Hi, thank you for your work on this project.
In our proxy server project, which uses mimalloc as the memory manager, we maintain statistics for each TLD using a dedicated structure when the server process runs. We have implemented an interface function that allows us to print stats for each TLD using _mi_stats_print, as shown below. However, as you can see in the attached screenshot, we have observed that the value of "total" decreases when this is done.
```c
void mi_custom_thread_stats_print_out(mi_stats_t* tid_stat, mi_output_fun* out, void* arg) mi_attr_noexcept {
_mi_stats_print(tid_stat, out, arg);
}
```
This issue did not occur with mimalloc version 2.1.2, but started happening after upgrading to version 3.0.8. Do you have any idea what might be causing this?
For reference, the screenshot only shows the output for the “pssv#1” thread, filtered from the _mi_stats_print results using grep.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the _mi_stats_print entry point and compare its behavior in mimalloc 2.1.2 and 3.0.8. Reproduce repeated per-TLD statistics printing with the provided mi_custom_thread_stats_print_out wrapper, then determine why the reported total decreases and document the relevant version change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100