Baigudin Software avatar
Baigudin Software logo
home
ru region
en region

BOOS Core for Texas Instruments AM18x ARM Microprocessors family is released

Baigudin Software project has represented the BOOS Core operating kernel for AM18x ARM Microprocessors family of Texas Instruments Company.

Class «util::Heap»

Heap memory.

Hardware address for system heap memory has to be aligned to eight.

public: Heap(int64 size, ::api::Toggle*& sw);

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.
sw — reference to global interrupt toggle interface.

public: virtual ~Heap();

Destructor.

public: virtual void* alloc(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.

Returns:
true if object has been constructed successfully.

public: static bool isObject(const Type* obj);

Tests if given object has been constructed object.

Parameters:
obj — pointer to object.

Returns:
true if object has been constructed successfully.

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.

Back to class list