Resource Limits and Configuration

PixelUI trades fixed capacity for predictable memory use. “What happens when this is full?” is part of the API contract.

Public setting Default Effect
PIXELUI_MAX_ANIMATION_COUNT 35 Inline animation slots
PIXELUI_MAX_APP_NUM 12 AppManager registrations
PIXELUI_MAX_VIEW_DEPTH 8 Live App depth and metadata
PIXELUI_APPLICATION_ARENA_SIZE 4096 B Shared storage for all live Apps
PIXELUI_APPLICATION_ARENA_MAX_ALIGNMENT 64 Maximum App alignment
PIXELUI_CALLBACK_STORAGE_SIZE 32 B ETL inline lambda capacity
PIXELUI_MAX_ICONVIEW_ITEMS 11 IconView items
PIXELUI_MAX_LISTVIEW_DEPTH 6 Submenu history depth
PIXELUI_MAX_POPUP_NUM 3 Active plus pending Popups
PIXELUI_MAX_ONSCREEN_WIDGET_NUM 6 FocusManager root nodes
PIXELUI_MAX_INT_FIXED_WIDTH 6 Maximum PopupValueDigits width
PIXELUI_MAX_COROUTINE_NUM 10 CoroutineScheduler capacity
PIXELUI_MAX_TEXT_LENGTH 30 Inline text and keyboard draft capacity
PIXELUI_MAX_LISTITEM_NAME_NUM 30 ListItem title buffer size

Feature switches and fonts

PIXELUI_USE_ANIMATION, PIXELUI_USE_POPUP, PIXELUI_USE_COROUTINE, and PIXELUI_USE_FOCUS control whether core modules are compiled. PIXELUI_USE_LABEL_SCROLL controls automatic scrolling for Label and menu titles. Info, Progress, ValueDigits, and Keyboard Popups can also be disabled independently. PIXELUI_USE_POPUP_KEYBOARD requires Focus to be enabled.

PIXELUI_FONT_TEXT/SMALL/TINY/NUMERIC/CHART define font roles used by Widgets. The default body font contains GB2312 glyphs. Replacing it can significantly reduce flash use when Chinese text is not needed.

External configuration

Define PIXELUI_CONFIG_PATH consistently across the library and firmware to point to one complete configuration file. Different translation units must not see different capacities or switches, because that creates ABI and ODR violations.

Tuning order

  1. Count peak simultaneously live Apps, Animations, Popups, and root Widgets.
  2. Leave headroom and handle false or LaunchResult failures.
  3. Measure sizeof, alignment, and the linker map again with the target compiler.
  4. Change one capacity category at a time and compare .bss and .data.

ViewManager, the App arena, and the other managers are inline members of PixelUI. Raising limits directly increases fixed RAM use even before those slots are occupied.

avatar
Link0327
汪🐱me0w, but furry wolf. 尝试变得毛茸茸
Link's Github
最新文章
网站信息
文章数目 :
3
本站访客数 :
本站总浏览量 :
最后更新时间 :