Setup cmake project
This commit is contained in:
32
src/kernel/demo/HeapDemo.h
Executable file
32
src/kernel/demo/HeapDemo.h
Executable file
@ -0,0 +1,32 @@
|
||||
/*****************************************************************************
|
||||
* *
|
||||
* H E A P D E M O *
|
||||
* *
|
||||
*---------------------------------------------------------------------------*
|
||||
* Beschreibung: Demonstration der dynamischen Speicherverwaltung. *
|
||||
* *
|
||||
* Autor: Michael Schoettner, HHU, 25.9.2016 *
|
||||
*****************************************************************************/
|
||||
#ifndef HeapDemo_include__
|
||||
#define HeapDemo_include__
|
||||
|
||||
#include "kernel/system/Globals.h"
|
||||
#include "kernel/process/Thread.h"
|
||||
|
||||
class MyObj {
|
||||
public:
|
||||
constexpr MyObj() : value(5) {};
|
||||
constexpr MyObj(const unsigned int val) : value(val) {};
|
||||
const unsigned int value;
|
||||
};
|
||||
|
||||
class HeapDemo : public Thread {
|
||||
public:
|
||||
HeapDemo(const HeapDemo& copy) = delete;
|
||||
|
||||
HeapDemo() : Thread("HeapDemo") {}
|
||||
|
||||
void run() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user