Stephen Crowley stephenc@placemark.com writes:
Works like a charm! Thanks. I'm curious though.. I set the stack size to 64 megs and the application immediately uses up that much ram. Is that the default behaviour on windows? What stops it from behaving like a normal stack and just allocating what's needed from the heap?
The ram isn't actually used, it's only reserved from the address space with an anonymous mapping. Only the pages that are really accessed will use physical memory/swap, so it doesn't use any more ram than a normal stack.