mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 11:10:52 +00:00
trunk roundhouse kick
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* It will panic if that buffer fills up.
|
||||
* If you are _sure_ no outstanding references to blocks in this buffer still exist, you can call
|
||||
* reset() to start from scratch.
|
||||
*
|
||||
*
|
||||
* Currently the only usecase for this class is the ESP32 bluetooth stack, where once we've called deinit(false)
|
||||
* we are sure all those bluetooth objects no longer exist, and we'll need to recreate them when we restart bluetooth
|
||||
*/
|
||||
@@ -18,14 +18,14 @@ class SimpleAllocator
|
||||
|
||||
uint32_t nextFree = 0;
|
||||
|
||||
public:
|
||||
public:
|
||||
SimpleAllocator();
|
||||
|
||||
void *alloc(size_t size);
|
||||
|
||||
/** If you are _sure_ no outstanding references to blocks in this buffer still exist, you can call
|
||||
* reset() to start from scratch.
|
||||
* */
|
||||
* reset() to start from scratch.
|
||||
* */
|
||||
void reset();
|
||||
};
|
||||
|
||||
@@ -35,8 +35,9 @@ void *operator new(size_t size, SimpleAllocator &p);
|
||||
* Temporarily makes the specified Allocator be used for _all_ allocations. Useful when calling library routines
|
||||
* that don't know about pools
|
||||
*/
|
||||
class AllocatorScope {
|
||||
public:
|
||||
class AllocatorScope
|
||||
{
|
||||
public:
|
||||
explicit AllocatorScope(SimpleAllocator &a);
|
||||
~AllocatorScope();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user