You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using Slint for a project built for the ESP32-S3 SoC. One issue I ran into is that Slint uses a lot of memory.
The ESP32-S3 has 512 KiB of internal RAM, and up to 16 MiB of external SPIRAM. I considered making my global allocator allocate in the external SPIRAM, but that is currently likely to cause undefined behavior on the ESP32-S3 because of unsupported atomic operations in the PSRAM.
Therefore, I decided to make my global allocator allocate in the internal RAM, and use a custom allocator with the allocator_api nightly Rust feature for large allocations without atomics.
Since Slint uses a lot of memory, I would like to make it use the PSRAM as much as possible. With some help from the Slint chat, I have been able to patch Slint to use a custom allocator for some allocations.
However, it would be nice if there was a more general, well supported solution.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have been using Slint for a project built for the ESP32-S3 SoC. One issue I ran into is that Slint uses a lot of memory.
The ESP32-S3 has 512 KiB of internal RAM, and up to 16 MiB of external SPIRAM. I considered making my global allocator allocate in the external SPIRAM, but that is currently likely to cause undefined behavior on the ESP32-S3 because of unsupported atomic operations in the PSRAM.
Therefore, I decided to make my global allocator allocate in the internal RAM, and use a custom allocator with the
allocator_apinightly Rust feature for large allocations without atomics.Since Slint uses a lot of memory, I would like to make it use the PSRAM as much as possible. With some help from the Slint chat, I have been able to patch Slint to use a custom allocator for some allocations.
However, it would be nice if there was a more general, well supported solution.
Beta Was this translation helpful? Give feedback.
All reactions