I left a scheduler test on to make sure it wouldn't leak any memory over a long period of time by setting up two threads (one to spin idly, the other to instantly invoke KeSyscallYield and give up its time share whenever it received one) and letting it sit. Didn't lose any memory, but I lost a chunk of hard drive space, having accidentally left the scheduler debug statements turned on...
I came back to find a very large serial dump file with this over and over and over and over...
Code:
KeTimePITInterrupt: Invoking KeTaskingSwitch (reason: timer tick).
KeTaskingSwitch: About to switch tasks to thread 2 (process 1).
KeSyscallHandler: System call invoked by thread 2!
KeSyscallHandler: EAX = 0x00000000, EBX = 0x00000000, ECX = 0x00000000
KeSyscallHandler: EDX = 0x00000000, ESI = 0x00000000, EDI = 0x00000000
KeSyscallYield: Yielding thread 2.
KeTaskingSwitch: About to switch tasks to thread 3 (process 1).
KeTimePITInterrupt: Invoking KeTaskingSwitch (reason: timer tick).
KeTaskingSwitch: About to switch tasks to thread 2 (process 1).
KeSyscallHandler: System call invoked by thread 2!
[ ... over a gigabyte of repetitive logs snipped ... ]
Oops. At least my debugging statements don't leak any memory!