[PR #147] [CLOSED] Adding a resizable Python heap #291

Closed
opened 2026-05-06 13:16:39 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/UpsilonNumworks/Upsilon/pull/147
Author: @AlexandreArduino
Created: 2/7/2022
Status: Closed

Base: upsilon-devHead: upsilon-dev-python-heap


📝 Commits (5)

📊 Changes

22 files changed (+238 additions, -10 deletions)

View changed files

📝 apps/code/app.cpp (+15 -0)
📝 apps/code/app.h (+6 -2)
📝 apps/global_preferences.cpp (+12 -0)
📝 apps/global_preferences.h (+10 -0)
📝 apps/settings/base.de.i18n (+4 -0)
📝 apps/settings/base.en.i18n (+4 -0)
📝 apps/settings/base.es.i18n (+4 -0)
📝 apps/settings/base.fr.i18n (+4 -0)
📝 apps/settings/base.hu.i18n (+4 -0)
📝 apps/settings/base.it.i18n (+4 -0)
📝 apps/settings/base.nl.i18n (+4 -0)
📝 apps/settings/base.pt.i18n (+4 -0)
📝 apps/settings/base.universal.i18n (+2 -0)
📝 apps/settings/sub_menu/code_options_controller.cpp (+62 -5)
📝 apps/settings/sub_menu/code_options_controller.h (+6 -2)
📝 docs/index.md (+1 -1)
📝 ion/Makefile (+1 -0)
📝 ion/include/ion.h (+1 -0)
ion/include/ion/python_heap.h (+24 -0)
ion/src/shared/python_heap.cpp (+61 -0)

...and 2 more files

📄 Description

Hi, in order to save memory I tried to make the python heap resizable. Here is how it works :

  • after a reset you can go in the settings to modify the size from 16kbi to 62kBi, even if there are some crashs with 16kbi you can save until 51kbi. The crashs are just with the code app not the whole calculator.
  • then if you go in the code app you will have less memory available for it because it will be used by others apps, files, ...
  • to use the free memory you can use two pointers which give you the address : char *memory_heap_available_start;
    && char *memory_heap_available_end; in the GlobalPreferences.
    I noticed a problem (a graphical one) in the python sub menu in the settings, I can only print 4 cells so I removed the cursor saving switch (but it is actually here in the code) in order to test/use my new cell.
    I hope it will be usefull :p

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/UpsilonNumworks/Upsilon/pull/147 **Author:** [@AlexandreArduino](https://github.com/AlexandreArduino) **Created:** 2/7/2022 **Status:** ❌ Closed **Base:** `upsilon-dev` ← **Head:** `upsilon-dev-python-heap` --- ### 📝 Commits (5) - [`536acc5`](https://github.com/UpsilonNumworks/Upsilon/commit/536acc525308dd1433f60b1bbd53f656d4276d45) first commit - [`e14f044`](https://github.com/UpsilonNumworks/Upsilon/commit/e14f0447389dd72e0d3c2f45d8cee265ec82a979) removed bad modifications - [`59eaede`](https://github.com/UpsilonNumworks/Upsilon/commit/59eaedea1d0ada69184c75956c30e828ae7cabb1) heap memory allocator added - [`4cb9d02`](https://github.com/UpsilonNumworks/Upsilon/commit/4cb9d029a157bf6ede51755b421479f35459e171) maximum size reset to 67000 - [`a66b39d`](https://github.com/UpsilonNumworks/Upsilon/commit/a66b39d4b40b0cb6267abc2f68fc279685654c14) mistake and indentation corrected ### 📊 Changes **22 files changed** (+238 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `apps/code/app.cpp` (+15 -0) 📝 `apps/code/app.h` (+6 -2) 📝 `apps/global_preferences.cpp` (+12 -0) 📝 `apps/global_preferences.h` (+10 -0) 📝 `apps/settings/base.de.i18n` (+4 -0) 📝 `apps/settings/base.en.i18n` (+4 -0) 📝 `apps/settings/base.es.i18n` (+4 -0) 📝 `apps/settings/base.fr.i18n` (+4 -0) 📝 `apps/settings/base.hu.i18n` (+4 -0) 📝 `apps/settings/base.it.i18n` (+4 -0) 📝 `apps/settings/base.nl.i18n` (+4 -0) 📝 `apps/settings/base.pt.i18n` (+4 -0) 📝 `apps/settings/base.universal.i18n` (+2 -0) 📝 `apps/settings/sub_menu/code_options_controller.cpp` (+62 -5) 📝 `apps/settings/sub_menu/code_options_controller.h` (+6 -2) 📝 `docs/index.md` (+1 -1) 📝 `ion/Makefile` (+1 -0) 📝 `ion/include/ion.h` (+1 -0) ➕ `ion/include/ion/python_heap.h` (+24 -0) ➕ `ion/src/shared/python_heap.cpp` (+61 -0) _...and 2 more files_ </details> ### 📄 Description Hi, in order to save memory I tried to make the python heap resizable. Here is how it works : - after a reset you can go in the settings to modify the size from 16kbi to 62kBi, even if there are some crashs with 16kbi you can save until 51kbi. The crashs are just with the code app not the whole calculator. - then if you go in the code app you will have less memory available for it because it will be used by others apps, files, ... - to use the free memory you can use two pointers which give you the address : char *memory_heap_available_start; && char *memory_heap_available_end; in the GlobalPreferences. I noticed a problem (a graphical one) in the python sub menu in the settings, I can only print 4 cells so I removed the cursor saving switch (but it is actually here in the code) in order to test/use my new cell. I hope it will be usefull :p --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:16:39 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Upsilon#291
No description provided.