|
|
Subscribe / Log in / New account

Heise reports from SCO Forum

Heise reports from SCO Forum

Posted Aug 19, 2003 14:50 UTC (Tue) by kunitz (subscriber, #3965)
In reply to: Heise reports from SCO Forum by BrucePerens
Parent article: Heise reports from SCO Forum

The slashdot discussion one month ago mentioned the Lion's book.

It seems to be that one:

Lion's Commentary on UNIX with Source Code
by John Lions and Dennis M. Ritchie, ISBN 1573980137


to post comments

Heise reports from SCO Forum

Posted Aug 19, 2003 15:06 UTC (Tue) by BrucePerens (guest, #2510) [Link] (8 responses)

Can someone with the book verify that the text actually appears, and what page it's on? FYI, here is the Amazon link for the book. Some of the precious Unix source code appears there. I wonder if SCO will sue Amazon. :-)

Bruce

Reference to the Lions book

Posted Aug 19, 2003 15:11 UTC (Tue) by cdamian (subscriber, #1271) [Link]

I don't understand japanese, but this seem to refer to the code and the Lion book: Unix 6th Edition Kernel Source Code and malloc.c

Heise reports from SCO Forum

Posted Aug 19, 2003 15:20 UTC (Tue) by LenZ (subscriber, #1051) [Link]

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...

Heise reports from SCO Forum

Posted Aug 19, 2003 15:24 UTC (Tue) by rfunk (subscriber, #4054) [Link] (3 responses)

Well, the Lions book contains all of the Unix v6 kernel code, and it
wasn't quite legal until Caldera blessed it in 1995-1996-ish, after which
it was officialy published.

The book is divided into two parts -- the bare code listing, and the
commentary. This code appear in line 2522, sheet 25 of the code listing.
The commentary is on page 5-2.

Heise reports from SCO Forum

Posted Aug 19, 2003 15:30 UTC (Tue) by rfunk (subscriber, #4054) [Link] (1 responses)

As it appears in the Lions book:
 
/* 
 * Allocate size units from the given 
 * map. Return the base of the allocated 
 * space. 
 * Algorithm is first fit. 
 */ 
malloc(mp, size) 
struct map *mp; 
{ 
   register int a; 
   register struct map *bp; 
 
   for (bp = mp; bp->m_size; bp++) { 
           if (bp->m_size >= size) { 
                   a = bp->m_addr; 
                   bp->m_addr =+ size; 
                   if ((bp->m_size =- size) == 0) 
                       do { 
                           bp++; 
                           (bp-1)->m_addr = bp->m_addr; 
                       while((bp-1)->m_size = bp->m_size); 
                   return(a); 
           } 
   } 
   return(0); 
} 

Heise reports from SCO Forum

Posted Aug 19, 2003 18:03 UTC (Tue) by rfunk (subscriber, #4054) [Link]

Oops, I missed a closing brace in this line:
 
                       while((bp-1)->m_size = bp->m_size); 
Should be:
 
                       } while((bp-1)->m_size = bp->m_size); 

Heise reports from SCO Forum

Posted Aug 19, 2003 15:32 UTC (Tue) by rfunk (subscriber, #4054) [Link]

Oops, it was the Santa Cruz Operation that blessed it, not Caldera.
Caldera didn't get the rights until later, then they opened it all under
the BSD-style license.

Heise reports from SCO Forum

Posted Aug 19, 2003 15:28 UTC (Tue) by kunitz (subscriber, #3965) [Link]

It gets more funny, in the foreword, which you can read at amazon.com the author thanks the "old" SCO for allowing the publication of the book.

The book has been published in April 1996 and has been declared UNIX book of the Year in 1996 by Unix Review's. The slashdot discussion mentioned, that the book contains a copyright notice by SCO.

Heise reports from SCO Forum

Posted Aug 19, 2003 16:17 UTC (Tue) by lorenb (guest, #14166) [Link]

I have this book and in Chapter 5. The book doesn't have pages per say. This is what's the index:

malloc:

line page
------------
2528 5-2
2534 5-2
2535 5-2
2536 5-2
2537 5-2
2538 5-2
2539 5-2
2542 5-2
2543 5-2


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