This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: Heapless C/C++


Hi,

I am sorry. I just hit reply.

---------- Forwarded message ----------
From: Shiv Shankar Dayal <shivshankar.dayal@gmail.com>
Date: Sat, Oct 8, 2011 at 2:46 PM
Subject: Re: Heapless C/C++
To: foxmuldrster@yahoo.com




On Sat, Oct 8, 2011 at 2:40 PM, Rick Hodgin <foxmuldrster@yahoo.com> wrote:
>
> Shiv,
>
> You have a significant misunderstanding of how heap and stack memories work. It's true that many architectures provide registers designed specifically to access stack memory, but it is still memory--it's just that those registers provide more convenient access to the stack, though a lot of that is also legacy baggage.
>
> Local stack memory is often faster because it's used more often and persists in the L1 data cache. But it's not in registers to be sure.
>
> Cheers,
> - Rick C. Hodgin
>
> --

Accepted. My knowledge of computer science is very inferior. But is it
not true that Bjarne Stroustrup himself proposed RAII to negate some
of the problems caused by heap allocation. Also, you can refer to this
Polymorphism without Heap Memory | Embedded Systems Experts which
describes problems associated with heap. Many of my concepts may be
wrong but heap is definitely source of lots of problems.


--
Best regards,
Shiv Shankar Dayal


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]