Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / pigweed / repo / pw_malloc / docs.rst
1 .. _module-pw_malloc:
2
3 ---------
4 pw_malloc
5 ---------
6
7 This module defines an interface for replacing the standard libc dynamic memory
8 operations.
9
10 This facade doesn't implement any heap structure or dynamic memory methods. It
11 only requires that backends implements a ``void pw_MallocInit();`` method.
12 This function is called before static intialization, and is responsible for
13 initializing global data structures required by the malloc implementation.
14
15 The intent of this module is to provide an interface for user-provided dynamic
16 memory operations that is compatible with different implementations.
17
18 Setup
19 =====
20 This module requires the following setup:
21
22   1. Chose a ``pw_malloc`` backend, or write one yourself.
23   2. If using GN build, Specify the ``pw_sys_io_BACKEND`` GN build arg to point
24      the library that provides a ``pw_malloc`` backend.
25
26 Module usage
27 ============
28 See backend docs for how to interact with the underlying dynamic memory
29 operations implementation.