This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Customized Allocator (on disk)
- From: Reza Roboubi <reza at linisoft dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Fri, 16 Nov 2001 03:53:30 -0800
- Subject: Customized Allocator (on disk)
- Organization: Linisoft
Is there any standard way to create a customized allocator so that it
operates on the disk directly? I want my hashes etc. to be created on
permanent storage (simply speaking, if I don't buffer it and such). It
seems that this would be a very useful way to reuse all the great code
that the STL offers for the purpose of making database
libraries/utilities. However, the problem is (I guess??) that the STL
objects lack an "attach" method. I cannot simply "attach" my hash to
the data that is on the disk. The hash starts out empty and the data is
lost unless I do some hacking to re-attach it. I am not interested in
serializing the STL objects to disk either. They must be created _on_
the disk to begin with.
If not possible, then what is the best way to hack STL to achieve the
desired result and reuse the code?
Thank you very much in advance.
--
Reza Roboubi
Software Development Consultant
www.linisoft.com