Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Diff between heap and free store?

5 views
Skip to first unread message

Veena Makal

unread,
Jun 12, 2001, 10:02:16 AM6/12/01
to
Hello,

what is the Diff between heap and free store?

Thanks
Veena


[ Send an empty e-mail to c++-...@netlab.cs.rpi.edu for info ]
[ about comp.lang.c++.moderated. First time posters: do this! ]

Jack Klein

unread,
Jun 13, 2001, 9:31:04 AM6/13/01
to
On 12 Jun 2001 10:02:16 -0400, Veena Makal <vee...@cisco.com> wrote
in comp.lang.c++.moderated:

> Hello,
>
> what is the Diff between heap and free store?
>
> Thanks
> Veena

In everyday use there is no real difference. "free store" is a term
with a specific meaning used in the C++ language standard. "heap" is
a common usage term to refer to the free store, but "heap" is not used
in the C++ language standard.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq

Angelo Torres

unread,
Jun 13, 2001, 9:32:15 AM6/13/01
to

"Veena Makal" <vee...@cisco.com> wrote in message
news:3B25A28F...@cisco.com...

> Hello,
>
> what is the Diff between heap and free store?

Nothing. They both refer to Level 3 or System Memory.
[sig and banner deleted-mod]

Ronald Fischer

unread,
Jun 13, 2001, 11:13:55 AM6/13/01
to
Veena Makal <vee...@cisco.com> writes:

> what is the Diff between heap and free store?

In the context of C++, they are the same.

Ronald
--
To reduce spam in my inbox, the address given in the Reply-To: header is
not guaranteed to live longer than 1 month after the article was
posted. My permanent address is (after deleting the XXX):
Ronald Otto Valentin Fischer <rov...@operamail.com>

Ian Knowles

unread,
Jun 13, 2001, 11:15:55 AM6/13/01
to
Veena Makal <vee...@cisco.com> wrote:

> what is the Diff between heap and free store?

According to another recent thread on the same issue it would appear
to be nothing (i.e. the terms are interchangeable).

OTOH if a specific C++ environment's new/delete do not use the same
memory pool as malloc/free you might find it useful to use one of
these terms to name the new/delete memory pool and the other to name
the malloc/free memory pool (of course it won't guarantee that anyone
else you communicate with will be sure which one you are referring to
:).


Regards,

Ian Knowles (remove the .nospam to reply)

Anand Ramalingam

unread,
Jun 13, 2001, 6:42:20 PM6/13/01
to
Veena Makal <vee...@cisco.com> wrote in message news:<3B25A28F...@cisco.com>...
> Hello,
>
> what is the Diff between heap and free store?
>
Herb Sutter has got the answers, http://www.gotw.ca/gotw/009.htm

Thanks
Anand

Francis Glassborow

unread,
Jun 13, 2001, 8:55:27 PM6/13/01
to
In article <8983074d.01061...@posting.google.com>, Anand
Ramalingam <anand_ra...@yahoo.com> writes

>> Hello,
>>
>> what is the Diff between heap and free store?
>>
>Herb Sutter has got the answers, http://www.gotw.ca/gotw/009.htm

No, those are not answers, they are just Herb's opinions. In the context
of his own writing that terminology is fine but it carries no weight
anywhere else.

Francis Glassborow ACCU
64 Southfield Rd
Oxford OX4 1PA +44(0)1865 246490
All opinions are mine and do not represent those of any organisation

Barry Kelly

unread,
Jun 14, 2001, 11:22:35 AM6/14/01
to
In article <3B25A28F...@cisco.com>
Veena Makal <vee...@cisco.com> wrote:

> what is the Diff between heap and free store?

I'm no expert, but the way I see it is:
* allocations from the heap are destroyed using free()
* allocations from the free store (via operator new) are destroyed
using operator delete

Doesn't this lead to quite a concrete distinction if 'new' and
'delete' are overridden?

-- Barry

James Kanze

unread,
Jun 20, 2001, 8:38:31 AM6/20/01
to
Angelo Torres wrote:
>
> "Veena Makal" <vee...@cisco.com> wrote in message
> news:3B25A28F...@cisco.com...

> > what is the Diff between heap and free store?

> Nothing. They both refer to Level 3 or System Memory.

Could you please explain what you mean by this. All memory is managed
by the system, at least on the systems I know. And where any
particular piece of memory is at any given moment (cache, main memory,
paged to disk, etc.) will depend on the system, and will change in
time.

--
James Kanze mailto:ka...@gabi-soft.de
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
Ziegelhüttenweg 17a, 60598 Frankfurt, Germany Tel. +49(069)63198627

0 new messages