On Thu, 25 Mar 2004, Arkady V.Belousov wrote:

> - bug: blockio.c/AllocateHMASpace(): wrongly freed extra buffer because
>   "FP_OFF(bp+1) >= lowbuffer" expression (should be ">").

If your patch would just correct this I would apply it straight away.
But sorry, there's too much extra stuff in there (sigh.. didn't I
write this before, what's the point...)

> In next letter I present patches, which will fix all of these bugs and
> inconsistencies, also as reduce kernel size after BC: in memory by 176
> bytes, unpacked executable by 182 bytes.

Sorry, I don't care about BC memory size. I'm not going to replace

b_prev(bp)->b_next = bp->b_next;
b_next(bp)->b_prev = bp->b_prev;

by

b_(b_(next)->b_prev = b_(buf)->b_prev)->b_next = next;

just to reduce that. Maybe, if it has a similar effect on OW I will think
again. Fair OW memory size reductions are welcome. But your blockio.c
changes only save 8 bytes (13 bytes without the 0xffff check)

I can save 21 bytes without the 0xffff check by simply applying.

@@ -486,10 +486,10 @@
       flush1(bp);
       /* unlink bp from buffer chain */

-      b_prev(bp)->b_next = bp->b_next;
       b_next(bp)->b_prev = bp->b_prev;
-      if (bp == firstbuf)
-        firstbuf = b_next(bp);
+      b_prev(bp)->b_next = bp->b_next;
+      if (FP_OFF(bp) == FP_OFF(firstbuf))
+        *(UWORD *)&firstbuf = bp->b_next;
       LoL_nbuffers--;
     }
     bp = b_next(bp);


It's also pointless to replace ofs_t by size_t. Since converting a pointer
to an integer in C gives a size_t, it can't be any different than your
ofs_t. Sure, the huge model is different but that doesn't count, since
compiling the kernel using that would break a lot more.

I've been thinking of using ofs_t for file offsets (unsigned long)
though...

Bart



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to