[update] stm32mp1 opemamp malloc -> rt_malloc.

This commit is contained in:
thread-liu 2021-03-31 09:17:44 +08:00
parent 69c0156368
commit 43e8524ffc
4 changed files with 20 additions and 8 deletions

View File

@ -18,18 +18,21 @@
#include <stdlib.h>
extern void *rt_malloc(unsigned long nbytes);
extern void rt_free(void *ptr);
#ifdef __cplusplus
extern "C" {
#endif
static inline void *metal_allocate_memory(unsigned int size)
{
return (malloc(size));
return (rt_malloc(size));
}
static inline void metal_free_memory(void *ptr)
{
free(ptr);
rt_free(ptr);
}
#ifdef __cplusplus

View File

@ -18,18 +18,21 @@
#include <stdlib.h>
extern void *rt_malloc(unsigned long nbytes);
extern void rt_free(void *ptr);
#ifdef __cplusplus
extern "C" {
#endif
static inline void *metal_allocate_memory(unsigned int size)
{
return (malloc(size));
return (rt_malloc(size));
}
static inline void metal_free_memory(void *ptr)
{
free(ptr);
rt_free(ptr);
}
#ifdef __cplusplus

View File

@ -18,18 +18,21 @@
#include <stdlib.h>
extern void *rt_malloc(unsigned long nbytes);
extern void rt_free(void *ptr);
#ifdef __cplusplus
extern "C" {
#endif
static inline void *metal_allocate_memory(unsigned int size)
{
return (malloc(size));
return (rt_malloc(size));
}
static inline void metal_free_memory(void *ptr)
{
free(ptr);
rt_free(ptr);
}
#ifdef __cplusplus

View File

@ -18,18 +18,21 @@
#include <stdlib.h>
extern void *rt_malloc(unsigned long nbytes);
extern void rt_free(void *ptr);
#ifdef __cplusplus
extern "C" {
#endif
static inline void *metal_allocate_memory(unsigned int size)
{
return (malloc(size));
return (rt_malloc(size));
}
static inline void metal_free_memory(void *ptr)
{
free(ptr);
rt_free(ptr);
}
#ifdef __cplusplus