*
* \brief Heap subsystem (public interface).
*
- * \version $Id$
* \author Bernie Innocenti <bernie@codewiz.org>
*/
/*
* This function prototype is deprecated, will change in:
* void heap_init(struct Heap* h, heap_buf_t* memory, size_t size)
- * in the nex BeRTOS release.
+ * in the next BeRTOS release.
*/
void heap_init(struct Heap* h, void* memory, size_t size)
{
size_t heap_freeSpace(struct Heap *h)
{
size_t free_mem = 0;
- for (MemChunck *chunk = h->FreeList; hunk; chunk = chunk->next)
- free_mem += chunck->size;
+ for (MemChunk *chunk = h->FreeList; chunk; chunk = chunk->next)
+ free_mem += chunk->size;
return free_mem;
}
#if CONFIG_HEAP_MALLOC
+/**
+ * Standard malloc interface
+ */
void *heap_malloc(struct Heap* h, size_t size)
{
size_t *mem;
return mem;
}
+/**
+ * Standard calloc interface
+ */
void *heap_calloc(struct Heap* h, size_t size)
{
void *mem;