Hi!

27-Апр-2004 00:40 [EMAIL PROTECTED] (Bart Oldeman) wrote to
[EMAIL PROTECTED]:

> From Lucho: HMAFree == 0xfff0 - bytesToAllocate is valid and may happen
> if the buffers occupy exactly all HMA space up to and including the
> last byte at ffff:ffff. Failing caused all buffers to go low ...
> +++ inithma.c 27 Apr 2004 00:40:43 -0000      1.26
> @@ -282,7 +282,7 @@
> -  if (HMAFree >= 0xfff0 - bytesToAllocate)
> +  if (HMAFree > 0xfff0 - bytesToAllocate)
>      return NULL;
>    HMAptr = MK_FP(0xffff, HMAFree);

     Wrong comment: buffers can't occupy "up to and the including the last
byte at ffff:ffff", because config_init_buffers() computes 0xfff0-HMAFree.
To clear the situation, let make _right, not misleading name_ for HMAFree:
it should be called HMAFreePtr. Ie. this is pointer to first byte of free
area, not size of free area. Consequently, HMAalloc() can't allocate memory,
when pointer=0xfff0-bytesToAllocate _below_ HMAFreePtr.

PS: Bart, why you not like to rename wrong names to something more sensible
and less misleading? For example:

firstAvailableBuffer -> HMAuserarea
HMAFree -> HMAFreePtr (or HMAFreeOfs)

?

PPS: In my previous patches was some bugfixes. For example, for
is_suspect(). Why they are not accepted?




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id│66&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to