comp.lang.ada
 help / color / mirror / Atom feed
* Intermixing two storage pools
@ 2003-01-22  7:42 Victor Porton
  0 siblings, 0 replies; 6+ messages in thread
From: Victor Porton @ 2003-01-22  7:42 UTC (permalink / raw)


I have to user-defined storage pools.

Is it OK to allocate ("new") by one of them and deallocate by the other 
("Uncheked_Deallocation"), using conversions between access types.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Intermixing two storage pools
@ 2003-01-22  8:01 Grein, Christoph
  2003-01-22  8:42 ` Victor Porton
  2003-01-22 20:29 ` Victor Porton
  0 siblings, 2 replies; 6+ messages in thread
From: Grein, Christoph @ 2003-01-22  8:01 UTC (permalink / raw)
  To: comp.lang.ada

> I have to user-defined storage pools.
> 
> Is it OK to allocate ("new") by one of them and deallocate by the other 
> ("Uncheked_Deallocation"), using conversions between access types.

No, as far as I know that's even erroneous. You must deallocated from the same 
pool you allocated it.

If you think about it, it's quite obvious that you should take account of the 
allocated item's 
origin.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Intermixing two storage pools
  2003-01-22  8:01 Grein, Christoph
@ 2003-01-22  8:42 ` Victor Porton
  2003-01-22 16:52   ` Robert A Duff
  2003-01-22 20:29 ` Victor Porton
  1 sibling, 1 reply; 6+ messages in thread
From: Victor Porton @ 2003-01-22  8:42 UTC (permalink / raw)


In article <mailman.11.1043222919.4961.comp.lang.ada@ada.eu.org>,
	"Grein, Christoph" <christoph.grein@eurocopter.com> writes:
>> I have to user-defined storage pools.
>> 
>> Is it OK to allocate ("new") by one of them and deallocate by the other 
>> ("Uncheked_Deallocation"), using conversions between access types.
> 
> No, as far as I know that's even erroneous. You must deallocated from the same 
> pool you allocated it.

Are you sure, which item of Standard deprecates this?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Intermixing two storage pools
@ 2003-01-22 10:35 Grein, Christoph
  0 siblings, 0 replies; 6+ messages in thread
From: Grein, Christoph @ 2003-01-22 10:35 UTC (permalink / raw)
  To: comp.lang.ada

> In article <mailman.11.1043222919.4961.comp.lang.ada@ada.eu.org>,
> 	"Grein, Christoph" <christoph.grein@eurocopter.com> writes:
> >> I have to user-defined storage pools.
> >> 
> >> Is it OK to allocate ("new") by one of them and deallocate by the other 
> >> ("Uncheked_Deallocation"), using conversions between access types.
> > 
> > No, as far as I know that's even erroneous. You must deallocated from the 
same 
> > pool you allocated it.
> 
> Are you sure, which item of Standard deprecates this?

This is not just a deprecation. See RM 13.11.2(16). It's erroneous, aka Nasal 
Demons effect.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Intermixing two storage pools
  2003-01-22  8:42 ` Victor Porton
@ 2003-01-22 16:52   ` Robert A Duff
  0 siblings, 0 replies; 6+ messages in thread
From: Robert A Duff @ 2003-01-22 16:52 UTC (permalink / raw)


porton@ex-code.com (Victor Porton) writes:

> Are you sure, which item of Standard deprecates this?

13.11.2(16).  How could it be otherwise?

- Bob



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Intermixing two storage pools
  2003-01-22  8:01 Grein, Christoph
  2003-01-22  8:42 ` Victor Porton
@ 2003-01-22 20:29 ` Victor Porton
  1 sibling, 0 replies; 6+ messages in thread
From: Victor Porton @ 2003-01-22 20:29 UTC (permalink / raw)


In article <wcciswh2kkx.fsf@shell01.theworld.com>,
	Robert A Duff <bobduff@shell01.TheWorld.com> writes:
> porton@ex-code.com (Victor Porton) writes:
> 
>> Are you sure, which item of Standard deprecates this?
> 
> 13.11.2(16).  How could it be otherwise?

I meant the case when two pool variables share the same memory (e.g. 
one pool uses other for allocation).

Well, I realize that eliminating this restriction would have bad impact 
on memory debuggers.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-01-22 20:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-22  7:42 Intermixing two storage pools Victor Porton
  -- strict thread matches above, loose matches on Subject: below --
2003-01-22  8:01 Grein, Christoph
2003-01-22  8:42 ` Victor Porton
2003-01-22 16:52   ` Robert A Duff
2003-01-22 20:29 ` Victor Porton
2003-01-22 10:35 Grein, Christoph

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