# mem.h File Reference

`#include <ubixos/types.h>`
`#include "net/debug.h"`
`#include "net/opt.h"`
`#include "net/arch.h"`

Go to the source code of this file.

## Defines
#define | mem_register_reclaim(f, arg)
#define | MEM_ALIGN_SIZE(size)
#define | MEM_ALIGN(addr) (void *)MEM_ALIGN_SIZE((uInt32)addr)
## Typedefs
typedef uInt16 | mem_size_t
## Functions
void | mem_init (void)
void * | mem_malloc (mem_size_t size)
void * | mem_malloc2 (mem_size_t size)
void | mem_free (void *mem)
void * | mem_realloc (void *mem, mem_size_t size)
void * | mem_reallocm (void *mem, mem_size_t size)

## Define Documentation

#define MEM_ALIGN | ( | addr |  | ) | (void *)MEM_ALIGN_SIZE((uInt32)addr)

#define MEM_ALIGN_SIZE | ( | size |  | ) |

| Value:
    (size + \
                                 ((((size) % MEM_ALIGNMENT) == 0)? 0 : \
                                 (MEM_ALIGNMENT - ((size) % MEM_ALIGNMENT))))

#define mem_register_reclaim | ( | f,
|  | arg |  | ) |

## Typedef Documentation

typedef uInt16 mem_size_t

## Function Documentation

void mem_free | ( | void * | mem | ) |

void mem_init | ( | void |  | ) |

void* mem_malloc | ( | mem_size_t | size | ) |

void* mem_malloc2 | ( | mem_size_t | size | ) |

void* mem_realloc | ( | void * | mem,
|  | mem_size_t | size
| ) |

void* mem_reallocm | ( | void * | mem,
|  | mem_size_t | size
| ) |