A method and system to reduce thrashing in a multi-threaded programming environment
is disclosed. A method in accordance with one embodiment of the present invention
includes intercepting an operating system thread creation request for a function,
creating a thread including a stack in response to intercepting the operating system
thread creation request, modifying an initial stack pointer of the stack, and executing
the function utilizing the thread in response to modifying the initial stack pointer.