13#if defined(__ARM_EABI__) || defined(__DOXYGEN__)
17#if defined(OS_USE_OS_APP_CONFIG_H)
18#include <cmsis-plus/os-app-config.h>
100#if defined(OS_TRACE_LIBC_MALLOC)
156 if (nelem == 0 || elbytes == 0)
168#if defined(OS_TRACE_LIBC_MALLOC)
169 trace::printf (
"::%s(%u,%u)=%p\n", __func__, nelem, elbytes, mem);
176 memset (mem, 0, nelem * elbytes);
264#if defined(OS_TRACE_LIBC_MALLOC)
265 trace::printf (
"::%s(%p,%u)=%p\n", __func__, ptr, bytes, mem);
277#if defined(OS_TRACE_LIBC_MALLOC)
286 if (nano_malloc_usable_size (RCALL ptr) >= bytes)
293 memcpy (mem, ptr, bytes);
301#if defined(OS_TRACE_LIBC_MALLOC)
353#if defined(OS_TRACE_LIBC_MALLOC)
378_malloc_r (_reent* impure __attribute__((unused)),
size_t size)
384_calloc_r ( _reent* impure __attribute__((unused)),
size_t n,
size_t elem)
390_free_r ( _reent* impure __attribute__((unused)),
void* ptr)
396_realloc_r ( _reent* impure __attribute__((unused)),
void* ptr,
413#pragma GCC diagnostic push
414#if defined(__clang__)
415#elif defined(__GNUC__)
416#pragma GCC diagnostic ignored "-Waggregate-return"
420_mallinfo_r ( _reent* impure __attribute__((unused)))
425#pragma GCC diagnostic pop
428_malloc_stats_r ( _reent* impure __attribute__((unused)))
434_malloc_usable_size_r ( _reent* reent __attribute__((unused)),
435 void* ptr __attribute__((unused)))
441_mallopt_r ( _reent* impure __attribute__((unused)),
442 int parameter_number __attribute__((unused)),
443 int parameter_value __attribute__((unused)))
449_memalign_r ( _reent* impure __attribute__((unused)),
450 size_t align __attribute__((unused)),
451 size_t s __attribute__((unused)))
457_pvalloc_r ( _reent* impure __attribute__((unused)),
458 size_t s __attribute__((unused)))
464_valloc_r ( _reent* impure __attribute__((unused)),
465 size_t s __attribute__((unused)))
void deallocate(void *addr, std::size_t bytes, std::size_t alignment=max_align) noexcept
Deallocate the previously allocated memory block.
void * allocate(std::size_t bytes, std::size_t alignment=max_align)
Allocate a memory block.
Scheduler critical section RAII helper.
int printf(const char *format,...)
Write a formatted string to the trace device.
void * realloc(void *ptr, size_t bytes)
Reallocate the memory block (non-initialised).
void * calloc(size_t nelem, size_t elbytes)
Allocate an array of memory blocks (initialised to zero).
void * malloc(size_t bytes)
Allocate a memory block (non-initialised).
void free(void *ptr)
Free the allocated memory block.
memory_resource * get_default_resource(void) noexcept
Get the default application memory manager.
bool in_handler_mode(void)
Check if the CPU is in handler mode.
Single file µOS++ RTOS definitions.