/**
 * @file malloc.h
 * @brief Header file for malloc.c
 * 
 */

#ifndef _MALLOC_H_
#define _MALLOC_H_

#include "sys.h"

/** NULL definition */
#define NULL 0
/** Maximum size of memory block */
#define MAX_BLOCK_SIZE	0x70000000

/**
 * A symbol containing the last address of the kernel image.
 * The symbol will be provided by the linker.
 */
extern unsigned int _kernel_end;

/** Typedef of int variables type */
typedef int tsize;

void init_memory ();
void *alloc_mem_block (unsigned size);
void free_mem_block (void *px);
void *malloc (tsize size);
void free (void *p);
void memory_leak_error();

#endif /* _MALLOC_H_ */
