Memory management

## Functions

void | gtg_block_memory_init (gtg_memory_t *memory, size_t block_size, long initial_block_number)
| Initialize the allocator.
void * | gtg_block_malloc (gtg_memory_t memory)
| Allocate a block of data.
void | gtg_block_free (gtg_memory_t memory, void *ptr)
| Free a block of data.

## Detailed Description

## Function Documentation

## gtg_block_free()

void gtg_block_free | ( | gtg_memory_t | memory,
|  | void * | ptr )

Free a block of data.

Parameters

  memory | The memory describer
  ptr | The block of data to free

## gtg_block_malloc()

void * gtg_block_malloc | ( | gtg_memory_t | memory | ) |

Allocate a block of data.

Parameters

  memory | The memory describer

Returns
  A pointer to a block or NULL if allocation failed

## gtg_block_memory_init()

void gtg_block_memory_init | ( | gtg_memory_t * | memory,
|  | size_t | block_size,
|  | long | initial_block_number )

Initialize the allocator.

Parameters

  memory | A memory describer
  block_size | The block size to be allocated when malloc is called
  initial_block_number | The number of blocks to allocate initialy