Quellcode durchsuchen

change: bsp/win32跑lvgl只需要几十kb内存,不需要lua vm扩展到4M的内存

跑printer的内存占用如下

I/user.lua      1048568 288904  322032
I/user.sys      524288  86492   86596

之前应该是看错位数了,以为耗掉了3Mbyte内存
Wendal Chen vor 4 Jahren
Ursprung
Commit
c348bbac96
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 1 1
      bsp/win32/include/FreeRTOSConfig.h
  2. 1 1
      bsp/win32/src/main_win32.c

+ 1 - 1
components/freertos/include/FreeRTOSConfig.h → bsp/win32/include/FreeRTOSConfig.h

@@ -45,7 +45,7 @@
 #define configUSE_DAEMON_TASK_STARTUP_HOOK		1
 #define configTICK_RATE_HZ						( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */
 #define configMINIMAL_STACK_SIZE				( ( unsigned short ) 70 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */
-#define configTOTAL_HEAP_SIZE					( ( size_t ) ( 4096 * 1024 ) )
+#define configTOTAL_HEAP_SIZE					( ( size_t ) ( 512 * 1024 ) )
 #define configMAX_TASK_NAME_LEN					( 12 )
 #define configUSE_TRACE_FACILITY				1
 #define configUSE_16_BIT_TICKS					0

+ 1 - 1
bsp/win32/src/main_win32.c

@@ -12,7 +12,7 @@
 #include "windows.h"
 #include <unistd.h>
 
-#define LUAT_HEAP_SIZE (4096*1024)
+#define LUAT_HEAP_SIZE (1024*1024)
 uint8_t luavm_heap[LUAT_HEAP_SIZE] = {0};
 
 void luat_log_init_win32(void);