Boost logo

Boost :

From: Larry Evans (jcampbell3_at_[hidden])
Date: 2001-05-23 19:13:50


John Max Skaller wrote:

> scleary_at_[hidden] wrote:
>

...skipping

>
> Finally: it is NOT obvious how to allocate
> an array: we would need to allocate
>
> struct raw_memory {
> frame_t frame;
> T data[n];
> };
>
> where 'n' is a VARIABLE. I know how big this is, but there
> is no way to give the memory supplying allocator a
> type to allocate for: we want n copies of T, and ONE frame.

I don't see how this can be generalized to any container with a dynamic number of
pointers, e.g. list<T*> unless the frame_t is modified to contain a pointer to
a class with a virtual function which can enumerate the pointers because
it knows its a list<T*> or whatever. This is the problem
discussed in the gc_sel_ssp.doc.zip file which I've just uploaded.
The discussion is in the gcArt.bdy.html file under the heading,
"Dynamic Proxy Container problem". Of course I'd appreciate you're
reading it and letting me know if I'm wrong about this somewhere.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk