Comments (6)
Hello Ralph, nice to hear from you!
Yeah, since I found umm_malloc I use it in my every embedded project, it is really great. Thank you very much for your hard work on it.
That's great that you've created your own repo, so that allocator could be improved even more! And about testing - ironically enough, I'm myself learning testing framework (in particular, CppUTest) for my embedded designs these days. It looks promising, its author even wrote the book, in case you're interested: Test Driven Development for Embedded C
About pulling changes: of course I'm glad to hear that, please let me know if you're waiting for me to do something (I'm not sure how exactly changes could be pulled from my repo to yours, should I do something for that?)
from umm_malloc.
Hi both,
Firstly, neat allocator, was looking for an open source one aimed at embedded devices and this is just great.
Secondly.. there's a bug. In umm_realloc: on a malloc failure, it frees the original pointer. The standard assures this not to be the case, and Lua assumes this too (eg when reallocing hash tables, it assumes data isn't lost/corrupt should an expansion fail).
The fix is very straight forward - just move umm_free( oldptr) in umm_realloc to the same block as the memcpy.
The bug is present both here and on @rhempel's website.
HTH and thanks again for making it available here :)
from umm_malloc.
Technically, this should be a new issue :-) Side note, are you using this allocator in an embedded Kua implementation - that's what I wrote it for in the first place! If I get a chance, I'll fix on my site...
from umm_malloc.
I figured it should be after I posted, I was just too eager when I saw you both in one place ;). My first time using github.
And I am, I saw that on your site too - one of the things that drew me to it. Lua 5.2, which includes an emergency garbage collector in case of OOM which allows the allocator to run closer to the limit (I believe most embedded are Lua 5.1.X?), probably why it hasn't popped up before. Working great now though :)
from umm_malloc.
Well, I'm using it for Lua as well, on the LEGO MINDSTORMS NXT - and I was having an issue occasionally when the garbage collector had to run - maybe this is related - actually it's very likely related. Thks for the report. I am more focused on ev3dev.org (Debian Jessie on LEGO MINDSTROMS EV3) right now, but I will definitely look at this when I have time
from umm_malloc.
Hello everyone.
This library is exactly what I need.Thank you very much!
from umm_malloc.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umm_malloc.