Oops forget about this part untill i ported BFG's version.
   DWORD      dwFlags = 0;
   // Without this flag the 'dwStackSize' parameter to CreateThread specifies the "Stack Commit Size"
   // and the "Stack Reserve Size" is set to the value specified at link-time.
   // With this flag the 'dwStackSize' parameter to CreateThread specifies the "Stack Reserve Size"
   // and the �Stack Commit Size� is set to the value specified at link-time.
   // For various reasons (some of which historic) we reserve a large amount of stack space in the
   // project settings. By setting this flag and by specifying 64 kB for the "Stack Commit Size" in
   // the project settings we can create new threads with a much smaller reserved (and committed)
   // stack space. It is very important that the "Stack Commit Size" is set to a small value in
   // the project settings. If it is set to a large value we may be both reserving and committing
   // a lot of memory by setting the STACK_SIZE_PARAM_IS_A_RESERVATION flag. There are some
   // 50 threads allocated for normal game play. If, for instance, the commit size is set to 16 MB
   // then by adding this flag we would be reserving and committing 50 x 16 = 800 MB of memory.
   // On the other hand, if this flag is not set and the "Stack Reserve Size" is set to 16 MB in the
   // project settings, then we would still be reserving 50 x 16 = 800 MB of virtual address space.
   dwFlags |= STACK_SIZE_PARAM_IS_A_RESERVATION;
just set it to 0 BFG sets differing stacksizes vanilla uses a constant stack so the stack reservation flag wont work.
Vanilla also uses async threads BFG use workers that require more precision but it should work a lot better on multicore machines.
Tests show that vanilla allocates 11 threads for the game with the above so it seems to work allright 

Productivity is a state of mind.