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 participates in OS DAY 2017 conference
The Baigudin Software Company has participated in OS DAY – a fourth scientific-practical conference, which aims to determine a mission of Russia in developing sphere of operating systems.
Interface «api::Heap»
Heap memory interface.
- api::Heap
- public api::Object
public:
virtual void* allocate(size_t size, void* ptr);
virtual bool isConstructed() const;
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: 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.