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
}
malloc
void * malloc(size_t size)
Definition:
malloc_framework_rtos.cpp:19
__attribute__
__attribute__((weak)) void malloc_init()
Definition:
malloc_framework_rtos.cpp:14
malloc.h
free
void free(void *ptr)
Definition:
malloc_framework_rtos.cpp:24
malloc_addblock
void malloc_addblock(void *addr, size_t size)
Assign blocks of memory for use by malloc().
Definition:
malloc_framework_rtos.cpp:9
malloc_init
void malloc_init(void)
Initialize Malloc.
src
malloc_framework_rtos.cpp
Generated by
1.8.15