Hi!
23-Май-2004 14:17 [EMAIL PROTECTED] (Bart Oldeman) wrote to
[EMAIL PROTECTED]:
> +++ newstuff.c 23 May 2004 14:17:36 -0000 1.33
> - for (i = 0; i < ppsp->ps_maxfiles; i++)
> - newtab[i] = ppsp->ps_filetab[i];
> -
> - for (; i < nHandles; i++)
> - newtab[i] = 0xff;
> + fmemset(newtab, 0xff, nHandles);
> + fmemcpy(newtab, ppsp->ps_filetab, ppsp->ps_maxfiles);
This is unequal replacement: in new code performed more memory access
(ie. it slower). Solution:
i = ppsp->ps_maxfiles;
/* copy existing part and fill up new part by "no open file" */
fmemcpy(newtab, ppsp->ps_filetab, i);
fmemset(newtab + i, 0xff, nHandles - i);
-------------------------------------------------------
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