
3 Mar
2004
3 Mar
'04
1:08 p.m.
Neal D. Becker wrote:
On a slightly different thought: if you use a special allocator with a container, such as vector, that is mmap-based, then serialization would be trivial. I wonder if we can use this?
This is the moral equivalent of fwrite'ing the vector to disk. It can work... for a while... if you don't upgrade the compiler and never change the object layout, or if you don't mind all your files being invalidated. Some compilers use such a scheme for their precompiled headers, I believe. You don't really need a serialization library for this, of course. ;-)