1.. _module-pw_malloc: 2 3--------- 4pw_malloc 5--------- 6 7This module defines an interface for replacing the standard libc dynamic memory 8operations. 9 10This facade doesn't implement any heap structure or dynamic memory methods. It 11only requires that backends implements a ``void pw_MallocInit();`` method. 12This function is called before static intialization, and is responsible for 13initializing global data structures required by the malloc implementation. 14 15The intent of this module is to provide an interface for user-provided dynamic 16memory operations that is compatible with different implementations. 17 18Setup 19===== 20This 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_malloc_BACKEND`` GN build arg to point 24 the library that provides a ``pw_malloc`` backend. 25 26Module usage 27============ 28See backend docs for how to interact with the underlying dynamic memory 29operations implementation. 30