Skip to content

Commit 6ff2312

Browse files
committed
fix warning in vs2019
1 parent 3cf2b62 commit 6ff2312

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ Special thanks to:
9797

9898
* [David Carlier](https://devnexen.blogspot.com/) (@devnexen) for his many contributions, and making
9999
mimalloc work better on many less common operating systems, like Haiku, Dragonfly, etc.
100-
* [Sam Gross](https://github.com/colesbury) for the [no GIL](https://github.com/colesbury/nogil) Python fork which
101-
uses mimalloc internally.
102100
* Mary Feofanova (@mary3000), Evgeniy Moiseenko, and Manuel Pöter (@mpoeter) for making mimalloc TSAN checkable, and finding
103101
memory model bugs using the [genMC] model checker.
104102
* Weipeng Liu (@pongba), Zhuowei Li, Junhua Wang, and Jakub Szymanski, for their early support of mimalloc and deployment
105103
at large scale services, leading to many improvements in the mimalloc algorithms for large workloads.
106104
* Jason Gibson (@jasongibson) for exhaustive testing on large scale workloads and server environments, and finding complex bugs
107105
in (early versions of) `mimalloc`.
108-
* Manuel Pöter (@mpoeter) and Sam Gross (@colesbury) for finding an ABA concurrency issue in abandoned segment reclamation.
106+
* Manuel Pöter (@mpoeter) and Sam Gross(@colesbury) for finding an ABA concurrency issue in abandoned segment reclamation. Sam also created the [no GIL](https://github.com/colesbury/nogil) Python fork which
107+
uses mimalloc internally.
108+
109109

110110
[genMC]: https://plv.mpi-sws.org/genmc/
111111

src/segment.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,8 @@ static mi_segment_t* mi_segment_init(mi_segment_t* segment, size_t required, mi_
659659

660660
// initialize pages info
661661
for (size_t i = 0; i < capacity; i++) {
662-
segment->pages[i].segment_idx = i;
662+
mi_assert_internal(i <= 255);
663+
segment->pages[i].segment_idx = (uint8_t)i;
663664
segment->pages[i].is_reset = false;
664665
segment->pages[i].is_committed = commit;
665666
segment->pages[i].is_zero_init = is_zero;

0 commit comments

Comments
 (0)