4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-18 00:29:14 +08:00

[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
bsp/stm32
stm32mp157a-st-discovery/board/ports/OpenAMP/libmetal/lib
include/metal/system/generic
system/generic
stm32mp157a-st-ev1/board/ports/OpenAMP/libmetal/lib
include/metal/system/generic
system/generic

@ -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

@ -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

@ -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

@ -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