Page 1 of 1

liballoc.. any suggestions?

Posted: Fri Nov 22, 2013 2:17 pm
by Zz
Maybe it was the fact that I started looking at one tired until I passed out at five that I did not find it.. BUT I was wondering before I spend anymore time or attempt to crack at it myself if anyone had a suggestion. The library on the wiki is broken so I went on a quest and found lots of information on allocation. I heard that it is best to use a pool allocator. Any direction?

Re: liballoc.. any suggestions?

Posted: Fri Nov 22, 2013 3:14 pm
by Combuster
The library on the wiki is broken
Which one, where? The wiki only contains references to libraries.

Re: liballoc.. any suggestions?

Posted: Fri Nov 22, 2013 3:15 pm
by Zz
Liballoc on http://wiki.osdev.org/C%2B%2B "An easy malloc implementation you can port to your OS is >>liballoc<<. It only requires basic Paging (that is, store a list of used and free pages, and have a function to find the next free page) to work."

Re: liballoc.. any suggestions?

Posted: Fri Nov 22, 2013 3:34 pm
by Combuster
wiki wrote:liballoc - Excellent allocator that was part of the Spoon Operating System and designed to be plugged into hobby OS's. Unfortunately it is no longer available.
And the only other link on the wiki 404s. There are however lots of other links you should try, or you can hijack it from elsewhere (no license or documentation found)

If you want to write an allocator on your own, you can do two things: keep it simple but inefficient so you can just use it (first-fit allocator), or design a full-fledged system in which case there are too many design considerations involved to call for one design.

Re: liballoc.. any suggestions?

Posted: Fri Nov 22, 2013 3:40 pm
by Zz
Alrighty, I'll learn that source well and then go about making a simple one for the knowledge. Thanks!

Re: liballoc.. any suggestions?

Posted: Fri Nov 22, 2013 4:34 pm
by Zz
ANNNND I'm rolling, time to play with it!

Re: liballoc.. any suggestions?

Posted: Tue Nov 26, 2013 7:40 pm
by blanham
Combuster wrote:
wiki wrote:liballoc - Excellent allocator that was part of the Spoon Operating System and designed to be plugged into hobby OS's. Unfortunately it is no longer available.
And the only other link on the wiki 404s. There are however lots of other links you should try, or you can hijack it from elsewhere (no license or documentation found)

If you want to write an allocator on your own, you can do two things: keep it simple but inefficient so you can just use it (first-fit allocator), or design a full-fledged system in which case there are too many design considerations involved to call for one design.
I'm using liballoc in my kernel and originally found a copy of liballoc by using (at the time) Google Code Search. The original hosting page was archived on the Wayback Machine here: https://web.archive.org/web/20070221204 ... /liballoc/ and indicates that liballoc is in the public domain. Unfortunately it didn't archive a copy of the original tar ball But, the source for the kernel that used liballoc is archived here: https://web.archive.org/web/20060219201 ... on/smk.php in the smk tarball, which had a BSD license on it, so you should be good to go either way.

Re: liballoc.. any suggestions?

Posted: Thu Dec 12, 2013 10:05 pm
by blanham
Bumping this to say I found the full source of liballoc in the Spoon OS snapshot tarball on the Wayback Machine and uploaded the contents to github:

https://github.com/blanham/liballoc
Quick download here: https://github.com/blanham/liballoc/releases/

The rest of the source for spoon/smk/libunix is also on my github for easy access. I'll update the wiki with a link to liballoc.

And original post w/ info here: http://forum.osdev.org/viewtopic.php?f= ... 1&p=19211a