Merge pull request #4555 from thread-liu/liukang

[update] stm32mp1 opemamp malloc -> rt_malloc.
This commit is contained in:
Bernard Xiong 2021-03-31 13:44:54 +08:00 committed by GitHub
commit 75c4df8363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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