# 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_ALIGN(addr) (void *)MEM_ALIGN_SIZE((uInt32)addr)
#define | MEM_ALIGN_SIZE(size)
#define | mem_register_reclaim(f, arg)

## Typedefs

typedef uInt16 | mem_size_t

## Functions

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)

## Define Documentation

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

Definition at line 77 of file mem.h.

#define MEM_ALIGN_SIZE | ( | size |  | ) |

Value:

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

Definition at line 73 of file mem.h.

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

Definition at line 69 of file mem.h.

## Typedef Documentation

typedef uInt16 mem_size_t

Definition at line 47 of file mem.h.

## Function Documentation

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

void mem_init | ( | void |  | ) |

Referenced by net_init().

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

Referenced by ethernetif_init().

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 |
| ) |  |  |