The library implements a communication interface between the Application and Modem cores on the nRF9160 through the RPC protocol, using the Inter Processor Communication (IPC) peripheral and a shared region of RAM.
The following figure shows a simplified Modem library architecture:
The Modem library dynamically allocates memory during some operations, for example tracing and DNS lookups. This memory is never shared with the modem core and hence, it can be located anywhere in the application core’s RAM instead of the shared memory regions. The library OS abstraction layer defines the following functions to allocate and free up dynamic memory for the library: