Skip to content

Commit c2cc5d8

Browse files
committed
Improve wording of some text.
1 parent ffc08a2 commit c2cc5d8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Doc/howto/free-threading-python.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ freeing the memory. Two examples of these data structures are the list object
207207
and the dictionary keys object. See ``InternalDocs/qsbr.md`` in the CPython
208208
source tree for more details on how QSBR is implemented. Running
209209
:func:`gc.collect` should cause all memory being held by QSBR to be actually
210-
freed. Note that even when QSBR frees the memory, mimalloc may not immediately
211-
return that memory to the OS and so the resident set size (RSS) of the process
212-
might not decrease.
210+
freed. Note that even when QSBR frees the memory, the underlying memory
211+
allocator may not immediately return that memory to the OS and so the resident
212+
set size (RSS) of the process might not decrease.
213213

214214

215215
mimalloc allocator vs pymalloc
@@ -219,8 +219,8 @@ The default build will normally use the "pymalloc" memory allocator for small
219219
allocations (512 bytes or smaller). The free-threaded build does not use
220220
pymalloc and allocates all Python objects using the "mimalloc" allocator. The
221221
pymalloc allocator has the following properties that help keep memory usage
222-
low: per-allocated-block overhead is small, effectively prevents memory
223-
fragmentation, and quickly returns free memory to the operating system. The
222+
low: small per-allocated-block overhead, effective memory fragmentation
223+
prevention, and quick return of free memory to the operating system. The
224224
mimalloc allocator does quite well in these respects as well but can have some
225225
more overhead.
226226

@@ -230,12 +230,12 @@ from their own heap. Using separate heaps means that free memory in one heap
230230
cannot be used for an allocation that uses another heap. Also, some heaps are
231231
configured to use QSBR (quiescent-state based reclamation) when freeing the
232232
memory that backs up the heap (known as "pages" in mimalloc terminology). The
233-
details of QSBR are their own topic but the short summary is that it creates a
234-
delay between the object being freed and the memory being released, either for
235-
new allocations or back to the OS.
233+
use of QSBR creates a delay between all memory blocks for a page being freed
234+
and the memory page being released, either for new allocations or back to the
235+
OS.
236236

237-
The mimalloc allocator also defers returning memory back to the OS. You can
238-
reduce that delay by setting the environment variable
237+
The mimalloc allocator also defers returning freed memory back to the OS. You
238+
can reduce that delay by setting the environment variable
239239
:envvar:`!MIMALLOC_PURGE_DELAY` to ``0``. Note that this will likely reduce
240240
the performance of the allocator.
241241

0 commit comments

Comments
 (0)