/*************************************************************************** * Copyright (c) 2003-2010, Broadcom Corporation * All Rights Reserved * Confidential Property of Broadcom Corporation * * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. * * $brcm_Workfile: $ * $brcm_Revision: $ * $brcm_Date: $ * * Module Description:Simple and fast heap moduile for use in bootloader. * Relies on unlimited memory being availabe since it will not free * anything. This heap is only concerned with memory blocks not stepping * on one another. * * Revision History: * * $brcm_Log: $ * * ***************************************************************************/ #if !defined(__FAST_HEAP_H__) #define __FAST_HEAP_H__ #include "bstd.h" void * malloc(size_t size); void * malloc_dbg(size_t size, char* file, int line); void free(void * ptr); void free_dbg(void *ptr, char* file, int line); void fast_heap_init(unsigned long heap_start); #if defined(BCM_DEBUG) #define malloc(size) malloc_dbg(size,__FILE__,__LINE__) #define free(ptr) free_dbg(ptr,__FILE__,__LINE__) #endif #endif