Mark3 Realtime Kernel
autoalloc.h File Reference

Automatic memory allocation for kernel objects. More...

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include "mark3cfg.h"

Go to the source code of this file.

Classes

class  Mark3::AutoAlloc
 The AutoAlloc class. This class provides an object-allocation interface for both kernel objects and user-defined types. This class supplies callouts for alloc/free that use object-type metadata to determine how objects may be allocated, allowing a user to create custom dynamic memory implementations for specific object types and sizes. As a result, the user-defined allocators can avoid the kinds of memory fragmentation and exhaustion issues that occur in typical embedded systems in which a single heap is used to satisfy all allocations in the application. More...
 

Namespaces

 Mark3
 

Typedefs

using Mark3::AutoAllocAllocator_t = void *(*)(AutoAllocType eType_, size_t sSize_)
 
using Mark3::AutoAllocFree_t = void(*)(AutoAllocType eType_, void *pvObj_)
 

Enumerations

enum  Mark3::AutoAllocType : uint8_t {
  Mark3::AutoAllocType::EventFlag, Mark3::AutoAllocType::MailBox, Mark3::AutoAllocType::Message, Mark3::AutoAllocType::MessagePool,
  Mark3::AutoAllocType::MessageQueue, Mark3::AutoAllocType::Mutex, Mark3::AutoAllocType::Notify, Mark3::AutoAllocType::Semaphore,
  Mark3::AutoAllocType::Thread, Mark3::AutoAllocType::Timer, Mark3::AutoAllocType::ConditionVariable, Mark3::AutoAllocType::ReaderWriterLock,
  Mark3::AutoAllocType::Coroutine, Mark3::AutoAllocType::User, Mark3::AutoAllocType::Raw = 0xFF
}
 

Detailed Description

Automatic memory allocation for kernel objects.

Definition in file autoalloc.h.