Memory management
[CDS library - Common Data Structures]

Memory operations are common for whole CDS library. More...

Collaboration diagram for Memory management:


Detailed Description

Because it must work together with SER's memory management and must work without it too, there are wrapper macros for memory allocation/deallocation.


Define Documentation

#define cds_free (   p  )     free(p)

Which function is choosen depends on SER and TRACE_CDS_MEMORY defines.

If SER is defined shm_free is choosen, standard free otherwise.

Definition at line 143 of file memory.h.

Referenced by free_message(), and free_reference_counter_group().

#define cds_free_pkg (   p  )     free(p)

Which function is choosen depends on SER and TRACE_CDS_MEMORY defines.

When SER is defined pkg_free is choosen, standard free otherwise.

Definition at line 147 of file memory.h.

Referenced by dstr_destroy().

#define cds_free_ptr   free

Which function is choosen depends on SER and TRACE_CDS_MEMORY defines.

If SER is defined shm_free is choosen, standard free otherwise.

Definition at line 145 of file memory.h.

#define cds_malloc (   s  )     malloc(s)

Which function is choosen depends on SER and TRACE_CDS_MEMORY defines.

When SER is defined shm_malloc is choosen, standard malloc otherwise.

Definition at line 142 of file memory.h.

Referenced by create_message(), create_message_ex(), create_reference_counter_group(), and dstr_get_str().

#define cds_malloc_pkg (   s  )     malloc(s)

Which function is choosen depends on SER and TRACE_CDS_MEMORY defines.

When SER is defined pkg_malloc is choosen, standard malloc otherwise.

Definition at line 146 of file memory.h.

Referenced by dstr_get_str_pkg().

#define cds_malloc_ptr   malloc

Which function is choosen depends on SER and TRACE_CDS_MEMORY defines.

If SER is defined shm_malloc is choosen, standard malloc otherwise.

Definition at line 144 of file memory.h.