-
Notifications
You must be signed in to change notification settings - Fork 3
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
Use playdate realloc for memory management #60
Conversation
Nice work. |
Yup — no problems in any place I’ve tested it so far. Also, I understand there might be some hesitation to merge this. If you would prefer, I can make this opt-in functionality behind a compiler flag. Let me know if you would prefer that and I’ll update this PR. |
I think this should be good and harmless to already existing projects, I'd go all-in. |
Oof. I’ve been testing on Ubuntu using Nim v2 That’s a really interesting crash point as I actually thought I was fully bypassing those functions by calling I’ll have to see if I can get my hands on a Mac to test. |
Just to be clear: are you saying this happens with and without my changes? |
Awesome — I’ll squeeze those changes into my PR |
I was referring to the path given to |
Works now on macOS. Windows still remains to be tested |
Works fine on Windows too. One thing that worries me is the way we are resolving the path to the playdate package.
|
The resolution rules are definitely funky. And, like you say, I just pushed an update this morning to get local development working across packages. There are a few things I’m running into:
Thus, I’ve landed on what you see in this PR. If you feel like this needs more consideration, I’m happy to spend more time to see if I can get the pure |
I think |
Doesn't seem to be the case unfortunately, at least using Nimble 0.13.1. Having
We can consider this good enough for now, but it is a thing we should keep in mind for the future. |
Yup — you’re totally right. I checked the nimble docs and that’s definitely the case. I asked on the Nim discord to see if there is a way to do what we need: https://discord.com/channels/371759389889003530/753721959308853319/1218960176875442196 |
I'd say we can cope with this for now if you agree. We'll fix this detail eventually, if feasible. |
Sounds good to me 👍 |
Thank you! |
Fixes #59
This change adds a deep integration within Nim for using the playdate memory allocator. This change fixes a host of memory corruption errors that I was experiencing on device only.