Embedded Artistry libmemory
Memory library for embedded systems (malloc and friends)
malloc_assert.c
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 <assert.h>
7
#include <
malloc.h
>
8
#include <memory.h>
9
10
#pragma mark - APIs -
11
12
__attribute__
((weak))
void
malloc_init
(
void
)
13
{
14
assert(0 &&
"malloc is not supported."
);
15
}
16
17
void
*
malloc
(
size_t
__attribute__
((unused)) size)
18
{
19
assert(0 &&
"malloc is not supported"
);
20
return
NULL;
21
}
22
23
void
free
(
void
*
__attribute__
((unused)) ptr)
24
{
25
assert(0 &&
"malloc is not supported"
);
26
while
(1)
27
{
28
// Loop forever
29
}
30
}
__attribute__
__attribute__((weak))
Definition:
malloc_assert.c:12
malloc
void * malloc(size_t __attribute__((unused)) size)
Definition:
malloc_assert.c:17
malloc.h
free
void free(void *__attribute__((unused)) ptr)
Definition:
malloc_assert.c:23
malloc_init
void malloc_init(void)
Initialize Malloc.
src
malloc_assert.c
Generated by
1.8.15