|
|
|
@ -1,3 +1,6 @@
|
|
|
|
|
liballoc - a small memory allocator
|
|
|
|
|
===================================
|
|
|
|
|
|
|
|
|
|
This is liballoc, a memory allocator for hobby operating systems, originally
|
|
|
|
|
written by Durand. According to the original page for liballoc it was released
|
|
|
|
|
into the public domain, but the copy I have contains the 3 clause BSD license.
|
|
|
|
@ -5,6 +8,9 @@ into the public domain, but the copy I have contains the 3 clause BSD license.
|
|
|
|
|
liballoc.c/h are the original release of liballoc taken from the spoon tarball
|
|
|
|
|
while liballoc_1_1.c/h are later versions found by detective work using Google.
|
|
|
|
|
|
|
|
|
|
Using liballoc
|
|
|
|
|
==============
|
|
|
|
|
|
|
|
|
|
There are 4 functions which you need to implement on your system:
|
|
|
|
|
|
|
|
|
|
int liballoc_lock();
|
|
|
|
@ -20,7 +26,7 @@ supposed to do.
|
|
|
|
|
on linux.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NOTE: There are two ways to build the library.
|
|
|
|
|
NOTE: There are two ways to build the library:
|
|
|
|
|
|
|
|
|
|
1) Compile the library with a new system file. For example, I've
|
|
|
|
|
left linux.c with the default distribution. It gets compiled
|
|
|
|
@ -31,8 +37,8 @@ NOTE: There are two ways to build the library.
|
|
|
|
|
your app.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QUICK START
|
|
|
|
|
-------------
|
|
|
|
|
Quick Start
|
|
|
|
|
===========
|
|
|
|
|
|
|
|
|
|
You can simply type: "make linux" to build the linux shared
|
|
|
|
|
library. Thereafter, you can link it directly into your applications
|
|
|
|
@ -50,11 +56,9 @@ essentially replacing the default malloc/free calls at runtime. It's
|
|
|
|
|
quite cool.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Originally by:
|
|
|
|
|
Durand Miller
|
|
|
|
|
|
|
|
|
|
clutter@djm.co.za
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|