Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion erpc_c/port/erpc_config_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
#endif

#if !defined(erpc_assert)
#if ERPC_HAS_FREERTOSCONFIG_H
#if ERPC_HAS_FREERTOSCONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
Expand Down
9 changes: 6 additions & 3 deletions erpc_c/port/erpc_port_memmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

extern "C" {
#include "FreeRTOS.h"
#include "MemManager.h"
#include "fsl_component_mem_manager.h"
}

#if !(__embedded_cplusplus)
Expand Down Expand Up @@ -58,13 +58,16 @@ void operator delete[](void *ptr) THROW

void *erpc_malloc(size_t size)
{
void *p = MEM_BufferAllocForever(size, 0);
void *p = MEM_BufferAlloc(size);
return p;
}

void erpc_free(void *ptr)
{
MEM_BufferFree(ptr);
if (ptr != NULL)
{
erpc_assert(MEM_BufferFree(ptr) == kStatus_MemSuccess);
}
}

/* Provide function for pure virtual call to avoid huge demangling code being linked in ARM GCC */
Expand Down
5 changes: 4 additions & 1 deletion erpc_c/port/erpc_port_mqx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ void *erpc_malloc(size_t size)

void erpc_free(void *ptr)
{
_mem_free(ptr);
if (ptr != NULL)
{
erpc_assert(_mem_free(ptr) == MQX_OK);
}
}

/* Provide function for pure virtual call to avoid huge demangling code being linked in ARM GCC */
Expand Down