Maxim
Thu Apr 13 17:58:10 CDT 2006
> Replace all memory allocations with fixed buffers, as much as possible.
Impossible. On-stack buffers in the kernel are deadly, and the global buffers
are not thread-safe.
> After doing it this way, when it comes time to move the code into the
> kernel, you might think twice... what if... at the customer site... BSOD...
> right now... I catch any exceptions in user-mode, relaunch the
Another way:
- rework the compression code (it does not rely on a platform much) to be
portable across kernel/user using macros - OSAlloc is malloc() in user and
ExAllocatePoolWithTag in kernel, and so on.
- write a tiny test tool to compress/decompress some file - main() and a call
to this portable code.
- test it a lot using BAT files.
- then integrate it to the kernel project.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com