Heise reports from SCO Forum
Heise reports from SCO Forum
Posted Aug 19, 2003 15:06 UTC (Tue) by BrucePerens (guest, #2510)In reply to: Heise reports from SCO Forum by kunitz
Parent article: Heise reports from SCO Forum
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
Posted Aug 19, 2003 15:11 UTC (Tue)
by cdamian (subscriber, #1271)
[Link]
Posted Aug 19, 2003 15:20 UTC (Tue)
by LenZ (subscriber, #1051)
[Link]
FWIW, It does include a quite similar looking pseudocode example for the
malloc() routine:
Not sure, if this is helpful in any way...
Posted Aug 19, 2003 15:24 UTC (Tue)
by rfunk (subscriber, #4054)
[Link] (3 responses)
Posted Aug 19, 2003 15:30 UTC (Tue)
by rfunk (subscriber, #4054)
[Link] (1 responses)
Posted Aug 19, 2003 18:03 UTC (Tue)
by rfunk (subscriber, #4054)
[Link]
Posted Aug 19, 2003 15:32 UTC (Tue)
by rfunk (subscriber, #4054)
[Link]
Posted Aug 19, 2003 15:28 UTC (Tue)
by kunitz (subscriber, #3965)
[Link]
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.
Posted Aug 19, 2003 16:17 UTC (Tue)
by lorenb (guest, #14166)
[Link]
malloc: line page
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
Reference to the Lions book
I don't have have the Lion book, but a german translation of Maurice J. Bach's
Design of the Unix Operating System.
Heise reports from SCO Forum
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);
}
Well, the Lions book contains all of the Unix v6 kernel code, and it Heise reports from SCO Forum
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.
As it appears in the Lions book:
Heise reports from SCO Forum
/*
* 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);
}
Oops, I missed a closing brace in this line:
Heise reports from SCO Forum
while((bp-1)->m_size = bp->m_size);
Should be:
} while((bp-1)->m_size = bp->m_size);
Oops, it was the Santa Cruz Operation that blessed it, not Caldera. Heise reports from SCO Forum
Caldera didn't get the rights until later, then they opened it all under
the BSD-style license.
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.Heise reports from SCO Forum
I have this book and in Chapter 5. The book doesn't have pages per say. This is what's the index:Heise reports from SCO Forum
------------
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