HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Memory Pool 357
18
MEMORY POOL
INTRODUCTION The SIP Stack does not allocate memory dynamically. All memory is allocated
during the initialization process and is managed by the SIP Stack. The memory
is divided into blocks called pages. The page size and the number of pages are
configurable. The collection of all pages is called a memory pool. The memory
pool manages the pages, supplying a simple API that allows the user to receive
and recycle memory bytes when needed. The memory pool can supply and
manage both consecutive and non-consecutive memory. In this way, memory is
managed more efficiently.
The SIP Stack uses different memory pools for different needs. Each of these
memory pools defines different page sizes and page numbers. Some of the API
functions of the SIP Stack require application memory allocation. These
functions must receive a valid memory pool as a parameter, and must sometimes
also receive a memory page as a parameter. To use these functions, your
application must define a memory pool according to your specific requirements.
DEFINITIONS You use handles to reference memory pools and memory pages. HRPOOL
defines a memory pool handle. HPAGE defines a memory page.You can find
both definitions in rpool_API.h.
API FUNCTIONS You can find the API functions of the memory pool in the file, rpool_API.h. The
Memory Pool API includes the following functions: