Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support using more than one memory region #83

Open
GnomedDev opened this issue Jul 25, 2024 · 2 comments
Open

Support using more than one memory region #83

GnomedDev opened this issue Jul 25, 2024 · 2 comments

Comments

@GnomedDev
Copy link

The ESP32 (using esp-hal) has two memory regions that are usable, in the linker scripts as dram_seg and dram2_seg. Currently, this dram2_seg is unusable unless a user is to setup multiple heaps which is annoying to use. Can support be added to allow one Heap to both (or even more) regions of memory?

@phil-opp
Copy link
Member

This was requested a few times, e.g: #40 and #16 . So I would be happy to merge a PR for this!

The implementation should not be too difficult. I think the deallocate function might even work for this, even though this behavior is not guaranteed. So adding a extend_with_region method should not be too difficult.

@pantsman0
Copy link

@GnomedDev I saw this the other day whilst thinking about another unrelated feature I wanted, and I thought I had an easy architecture to support this. I put it in the PR #84 if you want to test it. I've tested it on Nintendo Switch / Aarch64 and it works fine in my toy MVP app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants