@@ -41,24 +41,24 @@ Functions
4141
4242.. function :: threshold([amount])
4343
44- Set or query additional GC allocation threshold. Normally, GC is
45- triggered when new allocation cannot be satisfied, i.e. on out of
46- memory (OOM) condition. If this function is called, in addition to
47- OOM, GC will be triggered each time after *amount * of bytes has been
48- allocated (in total, since the previous time such amount of bytes
49- had been allocated). *amount * is usually specified as less than the
50- full heap size, with the intention to trigger GC earlier than the
51- heap will be exhausted, and in the hope that early GC will prevent
52- excessive memory fragmentation. This is a heuristic measure, effect
53- of which will vary from an application to application, as well as
54- the optimal value of *amount * parameter.
55-
56- Calling the function without argument will return current value of
57- the threshold. Value of -1 means a disabled allocation threshold.
44+ Set or query the additional GC allocation threshold. Normally, a collection
45+ is triggered only when a new allocation cannot be satisfied, i.e. on an
46+ out-of- memory (OOM) condition. If this function is called, in addition to
47+ OOM, a collection will be triggered each time after *amount * bytes have been
48+ allocated (in total, since the previous time such an amount of bytes
49+ have been allocated). *amount * is usually specified as less than the
50+ full heap size, with the intention to trigger a collection earlier than when the
51+ heap becomes exhausted, and in the hope that an early collection will prevent
52+ excessive memory fragmentation. This is a heuristic measure, the effect
53+ of which will vary from application to application, as well as
54+ the optimal value of the *amount * parameter.
55+
56+ Calling the function without argument will return the current value of
57+ the threshold. A value of -1 means a disabled allocation threshold.
5858
5959 .. admonition :: Difference to CPython
6060 :class: attention
6161
62- This function is MicroPython extension. CPython has a similar
62+ This function is a MicroPython extension. CPython has a similar
6363 function - ``set_threshold() ``, but due to different GC
6464 implementations, its signature and semantics are different.
0 commit comments