Embedded Artistry libmemory
Memory library for embedded systems (malloc and friends)
malloc_assert.c File Reference
#include <assert.h>
#include <malloc.h>
#include <memory.h>
Include dependency graph for malloc_assert.c:

Go to the source code of this file.

Functions

 __attribute__ ((weak))
 
void * malloc (size_t __attribute__((unused)) size)
 
void free (void *__attribute__((unused)) ptr)
 

Function Documentation

◆ __attribute__()

__attribute__ ( (weak)  )

Definition at line 12 of file malloc_assert.c.

13 {
14  assert(0 && "malloc is not supported.");
15 }

◆ free()

void free ( void *__attribute__((unused))  ptr)

Definition at line 23 of file malloc_assert.c.

24 {
25  assert(0 && "malloc is not supported");
26  while(1)
27  {
28  // Loop forever
29  }
30 }

Referenced by aligned_free().

◆ malloc()

void* malloc ( size_t __attribute__((unused))  size)

Definition at line 17 of file malloc_assert.c.

18 {
19  assert(0 && "malloc is not supported");
20  return NULL;
21 }

Referenced by aligned_malloc().