#include <stdlib.h>
Go to the source code of this file.
|  | 
| #define | __CCD_ALLOC_MEMORY(type,  ptr_old,  size)   (type *)realloc((void *)ptr_old, (size)) | 
|  | 
| #define | CCD_ALLOC(type)   __CCD_ALLOC_MEMORY(type, NULL, sizeof(type)) | 
|  | 
| #define | CCD_ALLOC_ARR(type,  num_elements)   __CCD_ALLOC_MEMORY(type, NULL, sizeof(type) * (num_elements)) | 
|  | 
| #define | CCD_REALLOC_ARR(ptr,  type,  num_elements)   __CCD_ALLOC_MEMORY(type, ptr, sizeof(type) * (num_elements)) | 
|  | 
◆ __CCD_ALLOC_MEMORY
      
        
          | #define __CCD_ALLOC_MEMORY | ( |  | type, | 
        
          |  |  |  | ptr_old, | 
        
          |  |  |  | size | 
        
          |  | ) |  | (type *)realloc((void *)ptr_old, (size)) | 
      
 
Functions and macros required for memory allocation. 
Definition at line 32 of file alloc.h.
 
 
◆ CCD_ALLOC
Allocate memory for one element of type. 
 
Definition at line 36 of file alloc.h.
 
 
◆ CCD_ALLOC_ARR
      
        
          | #define CCD_ALLOC_ARR | ( |  | type, | 
        
          |  |  |  | num_elements | 
        
          |  | ) |  | __CCD_ALLOC_MEMORY(type, NULL, sizeof(type) * (num_elements)) | 
      
 
Allocate memory for array of elements of type type. 
 
Definition at line 40 of file alloc.h.
 
 
◆ CCD_REALLOC_ARR
      
        
          | #define CCD_REALLOC_ARR | ( |  | ptr, | 
        
          |  |  |  | type, | 
        
          |  |  |  | num_elements | 
        
          |  | ) |  | __CCD_ALLOC_MEMORY(type, ptr, sizeof(type) * (num_elements)) |