mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-03 22:19:32 +03:00
fix pre-processor overflow (issue #1017)
This commit is contained in:
parent
ac35aa168c
commit
3c13579fcf
1 changed files with 5 additions and 0 deletions
|
@ -30,7 +30,12 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
#define MI_SEGMENT_MAP_PART_ENTRIES (MI_SEGMENT_MAP_PART_SIZE / MI_INTPTR_SIZE)
|
||||
#define MI_SEGMENT_MAP_PART_BIT_SPAN (MI_SEGMENT_ALIGN)
|
||||
#define MI_SEGMENT_MAP_PART_SPAN (MI_SEGMENT_MAP_PART_BITS * MI_SEGMENT_MAP_PART_BIT_SPAN)
|
||||
|
||||
#if MI_SEGMENT_MAP_PART_SPAN > MI_SEGMENT_MAP_MAX_ADDRESS
|
||||
#define MI_SEGMENT_MAP_MAX_PARTS (1)
|
||||
#else
|
||||
#define MI_SEGMENT_MAP_MAX_PARTS ((MI_SEGMENT_MAP_MAX_ADDRESS / MI_SEGMENT_MAP_PART_SPAN) + 1)
|
||||
#endif
|
||||
|
||||
// A part of the segment map.
|
||||
typedef struct mi_segmap_part_s {
|
||||
|
|
Loading…
Add table
Reference in a new issue