mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Merge remote-tracking branch 'remotes/esp8266/master'
This commit is contained in:
commit
127f05da9f
@ -32,7 +32,7 @@ void* ICACHE_RAM_ATTR pvPortZalloc(size_t size, const char* file, int line)
|
|||||||
return calloc(1, size);
|
return calloc(1, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ICACHE_RAM_ATTR xPortGetFreeHeapSize(void)
|
size_t xPortGetFreeHeapSize(void)
|
||||||
{
|
{
|
||||||
return umm_free_heap_size();
|
return umm_free_heap_size();
|
||||||
}
|
}
|
||||||
|
@ -967,7 +967,7 @@ static void *get_unpoisoned( unsigned char *ptr ) {
|
|||||||
|
|
||||||
UMM_HEAP_INFO ummHeapInfo;
|
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;
|
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);
|
umm_info(NULL, 0);
|
||||||
return (size_t)ummHeapInfo.freeBlocks * sizeof(umm_block);
|
return (size_t)ummHeapInfo.freeBlocks * sizeof(umm_block);
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,13 @@
|
|||||||
#define _UMM_MALLOC_CFG_H
|
#define _UMM_MALLOC_CFG_H
|
||||||
|
|
||||||
#include <debug.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
|
* There are a number of defines you can set at compile time that affect how
|
||||||
* the memory allocator will operate.
|
* the memory allocator will operate.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user