X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fstruct%2Fheap.c;h=4c00bd7ca0ed1ebd3b24a6048b6b8f26b8112d24;hb=a03edef2a1dba1c14bd1c761bfa635250893933a;hp=1faacf3c8a9078f60f0c4ab7611596bd51507262;hpb=683850c0edb6c3b55b6fef11d891430c4cd6b2bd;p=bertos.git diff --git a/bertos/struct/heap.c b/bertos/struct/heap.c index 1faacf3c..4c00bd7c 100644 --- a/bertos/struct/heap.c +++ b/bertos/struct/heap.c @@ -196,14 +196,17 @@ void heap_freemem(struct Heap* h, void *mem, 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; @@ -215,6 +218,9 @@ void *heap_malloc(struct Heap* h, size_t size) return mem; } +/** + * Standard calloc interface + */ void *heap_calloc(struct Heap* h, size_t size) { void *mem;