A stack allocation system and method is described. In one implementation,
an attempt is made to allocate N bytes of data to a stack having a fixed
depth. A probe size for the stack is determined. Verification is then
made to ascertain whether the probe size and the N bytes of data exceed
the fixed depth of the stack, prior to allocating the N bytes of data to
the stack. In another implementation, the N bytes of data are allocated
to a heap; if the probe size and the N bytes of data exceed the fixed
depth of the stack.