mirror of
https://github.com/esp8266/Arduino.git
synced 2025-09-08 06:28:00 +03:00
Move umm_info into cache
This commit is contained in:
@@ -967,7 +967,7 @@ static void *get_unpoisoned( unsigned char *ptr ) {
|
||||
|
||||
UMM_HEAP_INFO ummHeapInfo;
|
||||
|
||||
void *umm_info( void *ptr, int force ) {
|
||||
void ICACHE_FLASH_ATTR *umm_info( void *ptr, int force ) {
|
||||
|
||||
unsigned short int blockNo = 0;
|
||||
|
||||
@@ -1728,7 +1728,7 @@ void umm_free( void *ptr ) {
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
size_t umm_free_heap_size( void ) {
|
||||
size_t ICACHE_FLASH_ATTR umm_free_heap_size( void ) {
|
||||
umm_info(NULL, 0);
|
||||
return (size_t)ummHeapInfo.freeBlocks * sizeof(umm_block);
|
||||
}
|
||||
|
@@ -6,6 +6,13 @@
|
||||
#define _UMM_MALLOC_CFG_H
|
||||
|
||||
#include <debug.h>
|
||||
#ifdef __cplusplus
|
||||
#extern "C" {
|
||||
#endif
|
||||
#include "c_types.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* There are a number of defines you can set at compile time that affect how
|
||||
* the memory allocator will operate.
|
||||
|
Reference in New Issue
Block a user