Re: static, global variable memory allocation



On Tue, 06 Feb 2007 19:03:22 +0000, in comp.lang.c , Richard
Heathfield <rjh@xxxxxxxxxxxxxxx> wrote:

santosh said:

<snip>

What a pointless interview question!

Well, I suppose you meant to say heap instead of head. The more proper
term is free store.

So I have always been led to believe, but I can find no reference to
this term in C89 (I didn't check C99, but I certainly recall that "free
store" was the allegedly canonical term well before C99 was ratified).

Heap, stack and free store are not mentioned anywhere in the PDF od
C99.

Does anyone know why "free store" is given canonical status?

Wikipedia consider heap and free store synonyms. Meanwhile Herb Sutter
specifically differentiates between them on the Guru of the Week
website, by saying that malloc uses one, and new uses the other. Hm!

My guess is that free store was invented to differentiate from "heap"
as in a structured tree.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
.



Relevant Pages

  • Re: where? heap or stack?
    ... I wasn't bringing up the use of "heap" ... Eckel aren't aware of the distinction. ... If you thought I was arguing that heap and free store are the same, ...
    (comp.lang.cpp)
  • Re: static, global variable memory allocation
    ... term is free store. ... store" was the allegedly canonical term well before C99 was ratified). ... pile and the heap isn't. ... stack seems to be mentioned ...
    (comp.lang.c)
  • Re: Free Store of memory
    ... between Free Store area and heap area? ... all to do with memory allocation) - see make_heap et al. ...
    (microsoft.public.vc.language)
  • Re: Heap? what does it mean?
    ... What does a heap mean?I mena when it says, the memory location ... That is was allocated on the free store. ... you just ask the runtime system for it. ...
    (alt.comp.lang.learn.c-cpp)