comp.lang.ada
 help / color / mirror / Atom feed
From: Jan Prazak <janp9@gmx.net>
Subject: Re: access / freeing memory
Date: Fri, 19 Jul 2002 12:32:00 -0100
Date: 2002-07-19T12:32:00-01:00	[thread overview]
Message-ID: <pan.2002.07.19.11.55.21.740237.1504@gmx.net> (raw)
In-Reply-To: kIDZ8.16625$Zl6.445091@newsfep2-win.server.ntli.net

On Thu, 18 Jul 2002 17:22:38 -0100, chris.danx wrote:


>>  head.next.next := null; (to delete the 3rd element)
>>
>> or similar things???
> 
> How do you know that head.next.next exists?

Because the stack is head->1->2->3->null (it's just an example).

> Firstly, when you create an object via 'new' it is allocated and
> initialised.  Usually a call to new will typically take memory from the
> heap, this is an area of memory typically used for dynamic memory
> management.  The heap is usually within your program, and the compiler
> will insert code to manage it.

<...>

Thanks for this long description. I have already some experience with
pointers (in Pascal), so I have already found out how it works, but I
didn't know anything about heap (I didn't even know what it is, I thought
of some kind of a stack), so now I'm a bit wiser.

> p.s. why do ppl mention things like Storage_Pools to newbies?  It only
> confuses them and makes things harder!

Yes, that was really confusing...

BTW: I have read that Modula-3 has a fully functionable garbage
collection, and M3 is also free available, but I think I will continue
using Ada and have a look at M3 later. To all: does someone know where to
find a brief comparison between Ada95 and M3?

Jan




  reply	other threads:[~2002-07-19 13:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-16  0:52 access / freeing memory Jan Prazak
2002-07-15 22:22 ` tmoran
2002-07-16 13:54   ` Jan Prazak
2002-07-16 11:51     ` Fabien Garcia
2002-07-16 22:59       ` Jan Prazak
2002-07-16 15:42     ` Darren New
2002-07-16 22:59       ` Jan Prazak
2002-07-17  5:22         ` Simon Wright
2002-07-17 21:36           ` Jan Prazak
2002-07-24  0:25       ` David Thompson
2002-07-23  6:15   ` Kevin Cline
2002-07-18 18:22 ` chris.danx
2002-07-19 13:32   ` Jan Prazak [this message]
2002-07-19 23:50     ` chris.danx
     [not found] <mailman.1026804243.16337.comp.lang.ada@ada.eu.org>
2002-07-19  1:42 ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox