10000 gh-90815: Exclude mimalloc .c files from Windows build by DinoV · Pull Request #111532 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-90815: Exclude mimalloc .c files from Windows build #111532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix warnings on Windows
  • Loading branch information
DinoV committed Oct 31, 2023
commit 7894cca44b7b5caac139eb69b1fd7606addbc876
16 changes: 8 additions & 8 deletions Objects/obmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2730,23 +2730,23 @@ static bool _collect_alloc_stats(
static void
py_mimalloc_print_stats(FILE *out)
{
fprintf(out, "Small block threshold = %ld, in %u size classes.\n",
fprintf(out, "Small block threshold = %zd, in %u size classes.\n",
MI_SMALL_OBJ_SIZE_MAX, MI_BIN_HUGE);
fprintf(out, "Medium block threshold = %ld\n",
fprintf(out, "Medium block threshold = %zd\n",
MI_MEDIUM_OBJ_SIZE_MAX);
fprintf(out, "Large object max size = %ld\n",
fprintf(out, "Large object max size = %zd\n",
MI_LARGE_OBJ_SIZE_MAX);

mi_heap_t *heap = mi_heap_get_default();
struct _alloc_stats stats;
memset(&stats, 0, sizeof(stats));
mi_heap_visit_blocks(heap, false, &_collect_alloc_stats, &stats);

fprintf(out, " Allocated Blocks: %ld\n", stats.allocated_blocks);
fprintf(out, " Allocated Bytes: %ld\n", stats.allocated_bytes);
fprintf(out, " Allocated Bytes w/ Overhead: %ld\n", stats.allocated_with_overhead);
fprintf(out, " Bytes Reserved: %ld\n", stats.bytes_reserved);
fprintf(out, " Bytes Committed: %ld\n", stats.bytes_committed);
fprintf(out, " Allocated Blocks: %zd\n", stats.allocated_blocks);
fprintf(out, " Allocated Bytes: %zd\n", stats.allocated_bytes);
fprintf(out, " Allocated Bytes w/ Overhead: %zd\n", stats.allocated_with_overhead);
fprintf(out, " Bytes Reserved: %zd\n", stats.bytes_reserved);
fprintf(out, " Bytes Committed: %zd\n", stats.bytes_committed);
}
#endif

Expand Down
0