-
Notifications
You must be signed in to change notification settings - Fork 10
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
Arduino, Teensy #1
Comments
I meanwhile have set up a repo with the changes as mentioned above https://github.com/luni64/static_malloc |
Hi, for some reason, github did not sent email notification the time you submitted the issue, apologise for that While I do agree that code may require additional revisions to make it C++ friendly, the directory structure shall remain as it is presented here, because it's a typical unix style thing. Otherwise you can do whatever you want with the code, and forking away (ofc with keeping these minimal origin notes MIT license requires), modifying etc. what MIT permits you to do is encouraged. So, feel free to do that :) It's not clear to me what exactly changes are required here aside of making header more C++ friendly. And I don't think transferring ownership is required. What's your plan? |
Hi Andrey, Thanks for your answer.
Sure, I don't suggest to change anything in your repo, it just works fine as it is. My use case is the Arduino ecosystem. Specifically the PJRC Teensy 4.1 boards, which have an optional, external RAM chip. Smalloc is perfect to access this RAM. However, to make it more accessible to the average Arduino hobby user, I re-arranged your files, added a c++ compatible header , and some examples. (See https://github.com/luni64/static_malloc) Here a link to a Teensy forum thread which discusses the use of your library for Teensies: https://forum.pjrc.com/threads/63695-malloc-free-for-EXTMEM-and-DTCM. |
I see. I briefly listed through pages on thread you mentioned. Had you any troubles you ran into while using the thing? As you might noticed, it's not quite performant compared to "traditional" allocators & was developed primarily for secure small programs & debugging allocation problems. |
I tried your smalloc in an embedded environment (PJRC Teensy) which so far works perfectly. Ultimately I want to use it to access an externally attached memory chip which I'm sure will work as well.
To make your code more accessible to the average Arduino user I'd like to wrap it in an Arduino style library. Basically this just means to place the code in certain subfolders and add a header taking care of the required
extern "C"
to use it under c++.Additionally I'd add some easy to understand examples to the repository. I saw that your code is under MIT but thought it might be polite to ask anyway if this is OK with you.
(Credits of course goes to you and I'd link back to your repository)
The text was updated successfully, but these errors were encountered: