FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-90815: Define WITH_MIMALLOC macro in PC/pyconfig.h by vstinner · Pull Request #111528 · python/cpython · GitHub

/ cpython Public
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .h  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
3 changes: 2 additions & 1 deletion Objects/obmalloc.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2738,7 +2738,8 @@ py_mimalloc_print_stats(FILE *out)
MI_LARGE_OBJ_SIZE_MAX);

mi_heap_t *heap = mi_heap_get_default();
struct _alloc_stats stats = {};
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);
Expand Down
3 changes: 3 additions & 0 deletions PC/pyconfig.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* Use Python's own small-block memory-allocator. */
#define WITH_PYMALLOC 1

/* Define if you want to compile in mimalloc memory allocator. */
#define WITH_MIMALLOC 1

/* Define if you want to compile in object freelists optimization */
#define WITH_FREELISTS 1

Expand Down

Back | FazBrowse Home | New Git URL