BOOS Core API 3.1
- api::Collection<Type>
- api::Heap
- api::IllegalValue<Type>
- api::Interrupt
- api::Iterable<Type>
- api::Iterator<Type>
- api::Kernel
- api::List<Type>
- api::ListIterator<Type>
- api::Mutex
- api::Object
- api::ProcessorInterrupt
- api::ProcessorPll
- api::ProcessorRegisters
- api::ProcessorTimer
- api::Queue<Type>
- api::Resource
- api::Runtime
- api::Scheduler
- api::Semaphore
- api::Stack<Type>
- api::String<Char>
- api::Synchronizable
- api::System
- api::Task
- api::Thread
- api::Timer
- api::Toggle
- api::Value<Type>
- library::AbstractBuffer<Type,Alloc>
- library::AbstractLinkedList<Type,Alloc>
- library::Align<Type,SIZEOF,Alloc>
- library::Buffer<Type,COUNT,Alloc>
- library::CircularList<Type,Alloc>
- library::Heap
- library::LinkedList<Type,Alloc>
- library::LinkedNode<Type,Alloc>
- library::Memory
- library::Stack<Type,Alloc>
- library::String<Char,Alloc>
- library::Toggle<Alloc>
Baigudin Software registers the copyright of its own operating system – Embedded Object Operating System
The Russian Federal Service for Intellectual Property (Rospatent) registers the copyright of Embedded Object Operating System – Baigudin Software’s own embedded object-oriented real-time operating system.
Class «library::Heap»
Heap memory.
Hardware address for system heap memory has to be aligned to eight.
- library::Heap
- public api::Heap
- public api::Object
- public api::Heap
public:
Heap(int64 size, api::Toggle*& toggle);
virtual void* allocate(size_t size, void* ptr);
virtual bool isConstructed() const;
static bool isObject(const Type* obj);
void operator delete(void*, void*);
public: Heap(int64 size);
Constructor.
Parameters:
size — total heap size.
public: Heap(int64 size, api::Toggle*& toggle);
Constructor.
Reference to global interrupt interface pointer is used for a possibility to change a value of that pointer. Until that pointer is NULL global interrupt is not used. This gives you a possibility to change using global interrupts on fly.
Parameters:
size — total heap size.
toggle — reference to pointer to global interrupts toggle interface.
public: virtual ~Heap();
Destructor.
public: virtual void* allocate(size_t size, void* ptr);
Allocates memory.
Parameters:
size — required memory size in byte.
ptr — NULL value becomes to allocate memory, and other given values are simply returned as memory address.
Returns:
pointer to allocated memory or NULL.
public: virtual void free(void* ptr);
Frees an allocated memory.
Parameters:
ptr — pointer to allocated memory.
public: virtual bool isConstructed() const;
Tests if this object has been constructed.
public: static bool isObject(const Type* obj);
Tests if given object has been constructed object.
public: void operator delete(void*, void*);
Operator delete.
Parameters:
ptr — address of allocated memory block or a null pointer.
place — pointer used as the placement parameter in the matching placement new.
public: void* operator new(size_t, void* ptr);
Operator new.
Method initiates a building of heap memory checks and tests self memory structure data and leads to call the class constructor.
Parameters:
size — unused.
ptr — aligned to eight memory address.
Returns:
address of memory or NULL.
public: virtual void setToggle(::api::Toggle*& toggle);
Sets an allocated memory.
The method allows disabling and enabling thread context switching when memory is being allocated or freed. Thus, the best way is to pass an interface of global interrupt toggling. The parameter type is reference to pointer, as when referenced pointer equals to NULL, no blocks are happening.
Parameters:
toggle — reference to pointer to some controller.