mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 06:59:32 +03:00
update comments
This commit is contained in:
parent
a21ddd03fe
commit
560e32b2e1
1 changed files with 4 additions and 6 deletions
10
src/arena.c
10
src/arena.c
|
@ -11,12 +11,10 @@ large blocks (>= MI_ARENA_BLOCK_SIZE, 32MiB).
|
||||||
In contrast to the rest of mimalloc, the arenas are shared between
|
In contrast to the rest of mimalloc, the arenas are shared between
|
||||||
threads and need to be accessed using atomic operations.
|
threads and need to be accessed using atomic operations.
|
||||||
|
|
||||||
Currently arenas are only used to for huge OS page (1GiB) reservations,
|
Arenas are used to for huge OS page (1GiB) reservations or for reserving
|
||||||
otherwise it delegates to direct allocation from the OS.
|
OS memory upfront which can be improve performance or is sometimes needed
|
||||||
In the future, we can expose an API to manually add more kinds of arenas
|
on embedded devices. We can also employ this with WASI or `sbrk` systems
|
||||||
which is sometimes needed for embedded devices or shared memory for example.
|
to reserve large arenas upfront and be able to reuse the memory more effectively.
|
||||||
(We can also employ this with WASI or `sbrk` systems to reserve large arenas
|
|
||||||
on demand and be able to reuse them efficiently).
|
|
||||||
|
|
||||||
The arena allocation needs to be thread safe and we use an atomic bitmap to allocate.
|
The arena allocation needs to be thread safe and we use an atomic bitmap to allocate.
|
||||||
-----------------------------------------------------------------------------*/
|
-----------------------------------------------------------------------------*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue