Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 604585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:03:16+00:00 2026-05-13T17:03:16+00:00

What is stack thrash? Or a stack thrash? (Since I don’t know the definition

  • 0

What is “stack thrash”? Or “a stack thrash”? (Since I don’t know the definition I’m not sure if it is a countable or uncountable term.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T17:03:16+00:00Added an answer on May 13, 2026 at 5:03 pm

    Stack thrashing is like heap thrashing, but on the stack.

    There, now that’s explained.

    Oh, you want more detail huh ?

    If you emulate a stack based processor on a processor that isn’t you’re thrashing the stack.

    If your C code malloc’s and free’s every other line of code, you’re thrashing the heap.

    The point of stack thrashing as a problem is that if you profiled your code, the CPU spending pretty much all it’s time popping and pushing.

    For heap thrashing that’s malloc() & free() being your #1 & #2 most used functions.

    Now some CPU’s ( rockwell make some) actually are optimized to run a stack based language in hardware.

    • Internal ram that caches the top N kilobtyes of stack inside the CPU
    • Few registers
    • All instructions stack relative

    Oddly enough, the Java Virtual Machine is a stack based model.

    Running a really dumb FORTH implementation on x86 hardware will thrash the stack.
    The sort of thing you might write after reading the Forth spec, so you emit x86 machine code for forth instructions and DONT optimize it. Forth guys, I apologise, I know your implmentations are a lot better.

    Postscript is stack based too, which makes early postscript printers exciting: they had limited ram and slow CPU’s: and ran a stack-thrashing language. I’m sure a lot of effort went into things like the original Apple Laserwriter to make it run better.
    It had a Motorola 68000 CPU running at (10ish) megahertz and 1Mb of ram IIRC.

    Again, stack thrashers.

    Did that help ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 297k
  • Answers 297k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Because there is many processor I would start by Classic.… May 13, 2026 at 7:13 pm
  • Editorial Team
    Editorial Team added an answer This error occurs when you uncheck the "Declare Stage Instances… May 13, 2026 at 7:13 pm
  • Editorial Team
    Editorial Team added an answer It is a crude way to check the individual times.… May 13, 2026 at 7:13 pm

Related Questions

We are starting to use a Scrum process for development. We have a nice
What is stack alignment? Why is it used? Can it be controlled by compiler
What is a stack overflow error? What type of programs/programming languages is it likely
If I have a large amount of data in memory, what is the best
I want to do what myopenid does -- once you've logged, you can click

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.