mirror of
				https://github.com/esp8266/Arduino.git
				synced 2025-11-03 14:33:37 +03:00 
			
		
		
		
	Added missing "if (umm_heap == NULL) {..." to umm_free_heap_size_lw (#6929)
also called through xPortGetFreeHeapSize, umm_free_heap_size, ... Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
This commit is contained in:
		
				
					committed by
					
						
						Earle F. Philhower, III
					
				
			
			
				
	
			
			
			
						parent
						
							52d84b1ead
						
					
				
				
					commit
					30bfdad458
				
			@@ -162,6 +162,10 @@ UMM_STATISTICS ummStats;
 | 
			
		||||
 | 
			
		||||
// Keep complete call path in IRAM
 | 
			
		||||
size_t umm_free_heap_size_lw( void ) {
 | 
			
		||||
  if (umm_heap == NULL) {
 | 
			
		||||
    umm_init();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return (size_t)ummStats.free_blocks * sizeof(umm_block);
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
@@ -211,5 +215,3 @@ int ICACHE_FLASH_ATTR umm_info_safe_printf_P(const char *fmt, ...) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // BUILD_UMM_MALLOC_C
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user