malloc() implementation

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Whatever5k

malloc() implementation

Post by Whatever5k »

Can someone recommend me a good malloc() implementation?
I tried Doug Lea's implementation, but when trying to link it with my kernel I get some warnings (no errors) with "statements without any effect"...
Therx

Re:malloc() implementation

Post by Therx »

I'd write your own. They look complex but it is more persivirance than understanding needed to implement. Anyway I've attached by MM code to this file. It hasn't got a free function yet but the rest works. It doesn't use paging. It works with two stacks, used and free which contain info of the starts and lengths of peices of memory. Not too well documented but you can try it.

[attachment deleted by admin]
Whatever5k

Re:malloc() implementation

Post by Whatever5k »

Well, I could write my own malloc(), that's right - that's not difficult.
But that's not what I want. I need a professional and really efficient malloc() implementation...
Thanks, anyways...
K.J.

Re:malloc() implementation

Post by K.J. »

This list of pre-coded Malloc/Free libs might help you:
http://www.cs.colorado.edu/~zorn/Malloc.html

K.J.
Post Reply