Embedded Artistry libmemory
Memory library for embedded systems (malloc and friends)
malloc_framework_rtos.cpp
Go to the documentation of this file.
1 /*
2  * Copyright © 2019 Embedded Artistry LLC.
3  * License: MIT. See LICENSE file for details.
4  */
5 
6 #include <heap.hpp>
7 #include <malloc.h>
8 
9 void malloc_addblock(void* addr, size_t size)
10 {
11  os::Heap::addBlock(addr, size);
12 }
13 
14 __attribute__((weak)) void malloc_init()
15 {
16  os::Heap::init();
17 }
18 
19 void* malloc(size_t size)
20 {
21  return os::Heap::alloc(size);
22 }
23 
24 void free(void* ptr)
25 {
26  os::Heap::free(ptr);
27 }
void * malloc(size_t size)
__attribute__((weak)) void malloc_init()
void free(void *ptr)
void malloc_addblock(void *addr, size_t size)
Assign blocks of memory for use by malloc().
void malloc_init(void)
Initialize Malloc.