All books

Professional

Apps About Coach Log in Start reading

Computer Science · Glossary

What is Stack overflow?

Definition 3.7 University Computer Science — Year 1 · Chapter 3 — Functions and the Call Stack

The call stack has a maximal size, set when the program starts. A stack overflow happens when a call needs a frame that does not fit in it any more. In C it is not reported by the language: the program writes past the end of the stack region, and the system stops it.

The last depth reached by  for four stack limits. The points lie 3 or 4 levels below the line S/s: the frames that fit in what is left once a constant start-up cost, about 2.5 KiB, is paid. A loop doing the same work would use one frame at every limit.
The last depth reached by Listing 3.7 for four stack limits. The points lie 3 or 4 levels below the line S/sS/s: the frames that fit in what is left once a constant start-up cost, about 2.5 KiB, is paid. A loop doing the same work would use one frame at every limit.
Read in context →