|
|
Subscribe / Log in / New account

Heise reports from SCO Forum

Heise reports from SCO Forum

Posted Aug 19, 2003 15:20 UTC (Tue) by LenZ (subscriber, #1051)
In reply to: Heise reports from SCO Forum by BrucePerens
Parent article: Heise reports from SCO Forum

I don't have have the Lion book, but a german translation of Maurice J. Bach's Design of the Unix Operating System.

FWIW, It does include a quite similar looking pseudocode example for the malloc() routine:

algorithm malloc   /* algorithm to allocate map space */
input:   (1) map address  /* indicates which map to use */
         (2) requested number of units
output:  address, if succesful
         0, otherwise
{
    for (every map entry)
    {
        if (current map entry can fit in requested units)
        {
            if (requested units == number of units in entry)
                delete entry from map;
            else
                adjust start address of entry;
            return (original address of entry);
        }
     }
     return(0);
}

Not sure, if this is helpful in any way...


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds