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

  • SEARCH
  • Home
  • 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 6944619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:19:49+00:00 2026-05-27T13:19:49+00:00

My limited understanding of the stack/heap is that reference types are put onto the

  • 0

My limited understanding of the stack/heap is that reference types are put onto the heap (dynamically allocated), and value types are put on the stack.

Theoretically (as in a theoretical machine, compiler, programming language), is the stack a necessity? Couldn’t all memory be placed onto the heap?

  • 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-27T13:19:50+00:00Added an answer on May 27, 2026 at 1:19 pm

    In theory, you could do that. In practice, it would be a huge performance killer.

    In “Hackers”, Steven Levy tells the tale. At MIT, decades ago, before hardware stacks, writing a “decimal print” routine in under 50 instructions was the Holy Grail of hacking. Someone finally got there. Not too long after that, a new machine showed up, with a similar instruction set, except that it included a new instruction, PUSHJ, Push Return Address and Jump. PUSHJ pushed the return address onto a stack, instead of storing it at an absolute memory location (or in a register: same same – you have to store the register SOMEWHERE if you need to call something else). With PUSHJ, the decimal print could be written in 10 instructions.

    Modern RISC theory eschews stack instructions in favor of registers, and forces programmers (or, more likely, compilers) to implement PUSHJ in software on every call. This is a performance hit, any way you cut it, because you WILL pay the added cost of manipulating the stack pointer in software (instruction fetches, register juggles, register increment/decrement).

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

Sidebar

Related Questions

My understanding is that each new thread in .Net allocates 1MB of stack space
My limited understanding of ThreadLocal is that it has resource leak issues . I
From my limited understanding of nginx I know that nginx seperates itself from Apache
Why isn't every type of object implicitly serializable? In my limited understanding, are objects
In my limited experience, I've been on several projects that have had some sort
I've been using jQuery for a couple of years now with very limited understanding
I am new to android and have very limited understanding of the code. I
I have a limited understanding of Javascriptan I am trying to add a class
I'm trying to extend my (limited) understanding of class templates to class templates with
I want to teach myself enough machine learning so that I can, to begin

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.