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]

RE: Heapless C/C++


On Sat, Oct 08, 2011 at 11:13:31, Shiv Shankar Dayal wrote:
> Cc: gcc@gcc.gnu.org
> Subject: Re: Heapless C/C++
> 
> I have not thought over it for more than three days. But here is the 
> simple answer. You can implement two stacks in one. Keep normal stuff 
> which is not allocated by our alloca() like function at one end and 
> all other alloca() like objects at the other end. This would simplify 
> our problems a lot. Yes, this is very much like existing arrangement of stack
and heap where they grow in opposite direction.
> By using this mechanism we can minimize the shifting of objects at the 
> other end only.

So, instead of a stack and a heap, you now have a stack and "something that
looks
exactly like a heap but we'll call it a stacky-thing" which will be used for all
the
allocations that would have gone on the heap.

I think we're back at square one here...

Regards,

David P.



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