TheMole Posted July 21, 2022 Share Posted July 21, 2022 I'm not sure how useful this is going to be to anyone out there, but thought I'd share nevertheless... For another project I'm working on (or rather, playing around with...), I kept running into the issue that there is no support for malloc(), free() and the likes when using tms9900-gcc. Of course, since we're all rockstar programmers, and we all know which memory is used in our programs at all times, we'd rather do it manually since that's going to be the most efficient. But sometimes it's just more convenient to have all of that automated, right? So I've written a reusable malloc implementation that tries to be very memory efficient (it only introduces 1 word of overhead to keep track of the heap) and I believe is quite feature complete. It does sacrifice speed for memory efficiency, but on our platform I think that is the probably the most logical choice anyway. I have not tested this much beyond my other project and the simple test program that comes with it, but it does seem to work reliably so far. Feel free to play around with it and let me know if there's anything you'd do differently. https://github.com/themole-ti/libmalloc99 9 3 Quote Link to comment https://forums.atariage.com/topic/338343-libmalloc99-a-malloc-and-friends-implementation-for-gcc/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.