Boost logo

Boost Users :

From: Zeljko Vrba (zvrba_at_[hidden])
Date: 2007-09-22 01:14:57


On Fri, Sep 21, 2007 at 09:24:58AM -0700, Bruce Adams wrote:
>
> In a standard Red-Black tree implementation each node
> has 3 pointers, these double in size as do any
> pointers in the containers themselves. There are also
> issues with allocating on 8byte and 16byte boundaries.
>
A thought that just occured to me: *if* STL allowed parametrization over
pointer types (as it allows with allocators now), you could use system-
specific routines to allocate memory in lowest 4GB of address space and
still have 32-bit pointers. The 'pointer class' would take care of
converting 32-bit value to proper 64-bit pointer. It wouldn't have to
be pointer either, but e.g. array index or something else (accessor that
walks to disk and maintains in-memory cache).

Which reminds me, you might want to look at

http://stxxl.sourceforge.net/

[I have never personally used it]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net