summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library/gc.rst
blob: 3e9160f98d140f75dc82e4aaea2d0abefd8609ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
:mod:`gc` --- control the garbage collector
===========================================

.. module:: gc
   :synopsis: control the garbage collector

Functions
---------

.. function:: enable()

   Enable automatic garbage collection.

.. function:: disable()

   Disable automatic garbage collection.  Heap memory can still be allocated,
   and garbage collection can still be initiated manually using :meth:`gc.collect`.

.. function:: collect()

   Run a garbage collection.

.. function:: mem_alloc()

   Return the number of bytes of heap RAM that are allocated.

.. function:: mem_free()

   Return the number of bytes of available heap RAM.