Functions used for modifying and allocating memory.  
More...
#include <stdint.h>
#include <stddef.h>
Go to the source code of this file.
 | 
| 
#define  | __UCONCAT(a,  b)   #a b | 
|   | 
| 
#define  | _UCONCAT(a,  b)   __UCONCAT(a, b) | 
|   | 
| 
#define  | UCONCAT(b)   _UCONCAT(__USER_LABEL_PREFIX__, b) | 
|   | 
 | 
| 
static void  | alloc_size (1) | 
|   | 
| 
static void  | assume_aligned (4) | 
|   | 
 | 
| void(*  | Mem_Free )(void *ptr) | 
|   | 
| 
void *(*  | _FP_Mem_Malloc )(size_t size) __asm__(UCONCAT("Mem_Malloc")) __attribute__((alloc_size(1) | 
|   | 
| 
void *(*  | warn_unused_result ) | 
|   | 
| 
static void  | unused | 
|   | 
| void *(*  | Mem_Memcpy )(void *destination, const void *source, size_t num) __attribute__((access(read_only | 
|   | 
| 
void *(*  | access )(write_only, 1, 3))) | 
|   | 
| void *(*  | Mem_Memset )(void *ptr, int value, size_t num) __attribute__((access(write_only | 
|   | 
Functions used for modifying and allocating memory. 
Similar to the memory functions provided by the C standard library. 
 
◆ Mem_Free
  
  
      
        
          | void(* Mem_Free) (void *ptr)  | 
          ( | 
          void *  | 
          ptr | ) | 
           | 
         
       
   | 
  
extern   | 
  
 
Frees memory allocated by malloc, allowing it to be reused.
- Parameters
 - 
  
    | ptr | The pointer to the allocated region of memory to free.  | 
  
   
 
 
◆ Mem_Memcpy
  
  
      
        
          | void *(* Mem_Memcpy) (void *destination, const void *source, size_t num) __attribute__((access(read_only  | 
          ( | 
          void *  | 
          destination,  | 
         
        
           | 
           | 
          const void *  | 
          source,  | 
         
        
           | 
           | 
          size_t  | 
          num  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
extern   | 
  
 
Copies one region of memory to another. Equivalent to the C standard library function with the same name.
Copies num bytes from source to destination.
- Parameters
 - 
  
    | [out] | destination | A pointer to the destination of the copy.  | 
    | [in] | source | A pointer to the source for the copy.  | 
     | num | The number of bytes to copy.  | 
  
   
- Returns
 destination 
 
 
◆ Mem_Memset
  
  
      
        
          | void *(* Mem_Memset) (void *ptr, int value, size_t num) __attribute__((access(write_only  | 
          ( | 
          void *  | 
          ptr,  | 
         
        
           | 
           | 
          int  | 
          value,  | 
         
        
           | 
           | 
          size_t  | 
          num  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
extern   | 
  
 
Sets a region of memory to a specific value. Equivalent to the C standard library function with the same name.
Fills the region pointed to by ptr with num bytes of value value (zero-extended to a byte).
- Parameters
 - 
  
    | [out] | ptr | A pointer to the region of memory to fill.  | 
     | value | The value to fill the memory region with.  | 
     | num | The number of bytes to fill.  | 
  
   
- Returns
 ptr