GithubHelp home page GithubHelp logo

Comments (6)

dimonomid avatar dimonomid commented on August 30, 2024

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.

almania avatar almania commented on August 30, 2024

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.

rhempel avatar rhempel commented on August 30, 2024

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.

almania avatar almania commented on August 30, 2024

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.

rhempel avatar rhempel commented on August 30, 2024

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.

TheBigFish avatar TheBigFish commented on August 30, 2024

Hello everyone.
This library is exactly what I need.Thank you very much!

from umm_malloc.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.