---
title: "LVGL: Stress"
canonical_url: https://developer.repebble.com/pebbleos/docs/samples/third_party/lvgl/stress/
last_updated: 2026-11-21
sdk_version: 4.44
---
# LVGL: Stress

Source: https://developer.repebble.com/pebbleos/docs/samples/third_party/lvgl/stress/

This sample runs the stress demo that comes with [LVGL](https://developer.repebble.com/pebbleos/docs/third_party/lvgl.md): one round of objects of every kind created, animated and deleted while others are still animating. It ends after the round, with the most memory LVGL had in use.

Run:

`pbl samples samples/third_party/lvgl/stress`

Boards:

every board

## Sources

src/main.c

```
#include \<stdio.h\>#include \<pbl/kernel/delay.h\>#include \<demos/lv\_demos.h\>#include \<pbl\_lvgl.h\>int main(void) {lv\_mem\_monitor\_t mem;int ret;ret = pbl\_lvgl\_init();if (ret != 0) {fprintf(stderr, "lvgl: init failed (%d)\n", ret);return ret;}printf("lvgl: stress on %dx%d\n",(int)lv\_display\_get\_horizontal\_resolution(pbl\_lvgl\_get\_display()),(int)lv\_display\_get\_vertical\_resolution(pbl\_lvgl\_get\_display()));/\* The demos come with LVGL, each enabled by its CONFIG\_LV\_USE\_DEMO\_\* option. \*/lv\_demo\_stress();/\* \* One round creates and deletes every kind of object, with their animations. The demo is \* between two rounds until its first step runs. \*/while (lv\_demo\_stress\_finished()) {pbl\_sleep\_ms(lv\_timer\_handler());}while (!lv\_demo\_stress\_finished()) {pbl\_sleep\_ms(lv\_timer\_handler());}lv\_mem\_monitor(&mem);printf("lvgl: one round, at most %u bytes of memory used\n", (unsigned int)mem.max\_used);printf("Sample done\n");return 0;}
```

## Output

```
lvgl: stress on \d+x\d+
lvgl: one round, at most \d+ bytes of memory used
Sample done
```

Generated from PebbleOS [4bbc630fa](https://github.com/coredevices/pebbleos/commit/4bbc630fa451369e352c06b8276c7fe37c67f4fd). This page is maintained in the pebbleos repository: [docs/samples/third\_party/lvgl/stress.md](https://github.com/coredevices/pebbleos/blob/4bbc630fa451369e352c06b8276c7fe37c67f4fd/docs/samples/third_party/lvgl/stress.md).
