FreeRTOS: use unordered_map as it has better runtime for access
This commit is contained in:
parent
310dc029a0
commit
c2488a2d28
|
@ -1,6 +1,6 @@
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <map>
|
#include <unordered_map>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ void APP_ERROR_HANDLER(int err) {
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
std::map<void *, size_t> allocatedMemory;
|
std::unordered_map<void *, size_t> allocatedMemory;
|
||||||
size_t currentFreeHeap = configTOTAL_HEAP_SIZE;
|
size_t currentFreeHeap = configTOTAL_HEAP_SIZE;
|
||||||
size_t minimumEverFreeHeap = configTOTAL_HEAP_SIZE;
|
size_t minimumEverFreeHeap = configTOTAL_HEAP_SIZE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user