[comp.os.minix] mined problem

Leisner.Henr@xerox.com (Marty) (05/17/88)

Well, I'm recompiling some stuff and I notice mined didn't work.

I found some stuff that looks really broken (I hadda get out my K&R for this).
BTW, I'm using Aztec C (4.1b).

Looking at the code I found the following in init_alloc() --
if ((ptr = sbrk(MEMORY_SIZE)) < 0)
should be
if((ptr = sbrk(MEMORY_SIZE)) == (char *) -1)

In addition, MEMORY_SIZE == 50K, which is actually < 0 using 16 bit ints.  I'm
totally unsure of what sbrk(2) is doing or why  mined works in the first place.

Not anxious to do a rewrite of mined, that's all for now.  But it appears to
have some odd quirks.  I've seem to have an unusual amount of grief with mined
(sometimes it works and sometimes it don't and I generally don't know what I
changed).

marty
ARPA:	leisner.henr@xerox.com
GV:  leisner.henr
NS:  martin leisner:henr801c:xerox
UUCP:	nsc!nscimg!amps!marty