Hi, Patch 3 of 5 Juan PREVIOUS OPERATION 1. Several functions used memcpy_from/tofs to move 1, 2 or 4 bytes, instead of the more efficient get_user_*/put_user_*, so wasting memory. 2. Other functions did the opposite: transfer more than 4 bytes of memory using for loops with get_user_*/put_user_* instead of memcpy_from/tofs, again wasting memory. 3. Library function memmove() implemented and used a memory block move function (blt_back()), almost exactly the same as fmemcpy(), again wasting memory. NEW OPERATION 1. All transfers to/from user space less than 4 bytes were modified to use only get_user_*/put_user_* functions. 2. All transfers to/from user space more than 4 bytes were modified to use only memcpy_from/tofs functions. 3. Removed blt_back() function and replaced it with fmemcpy(). 4. In file "arch/i86/drivers/block/doshd.c", function "bioshd_geninit()" was rewritten to make it faster and smaller. OTHER CHANGES Code size reduced by 80 bytes. The Image builded without errors. The kernel was tested with QEMU and dioscuri emulators. Also in a PPro pc booting from floppy.
Attachment:
elksQ.patch
Description: Binary data