delegate memory management for knx tables to Platform class. Preallocate memory for them on linux.

This commit is contained in:
Thomas Kunze
2018-12-12 23:17:42 +01:00
parent bdaca43642
commit bd93aa12fa
22 changed files with 107 additions and 48 deletions

View File

@@ -6,6 +6,7 @@
class LinuxPlatform: public Platform
{
using Platform::_memoryReference;
public:
LinuxPlatform();
@@ -39,6 +40,8 @@ public:
//memory
uint8_t* getEepromBuffer(uint16_t size);
void commitToEeprom();
uint8_t* allocMemory(size_t size);
void freeMemory(uint8_t* ptr);
private:
uint32_t _multicastAddr;
uint16_t _port;
@@ -46,6 +49,7 @@ private:
void doMemoryMapping();
uint8_t* _mappedFile;
int _fd;
uint8_t* _currentMaxMem = 0;
};
#endif