Boost logo

Boost Users :

From: James Hughes (JHughes_at_[hidden])
Date: 2006-04-10 06:05:24


Hello all,

not sure if this is the right place to ask, but there maybe something in
boost that can help.

I would like to use/write some file handling classes that implement
something like delayed writing. The reason is that on our embedded device,
we need to log information to flash memory. This information may be
generated very frequently (every second or more). However, since our devices
are in the field for long periods of time (8-10 years) this means that to
continually be writing to flash memory, we can reach the limit of the
capability of the flash re-write cycle (10k to 1mill erases before failure
depending on quality), even when using a load levelling fs like Jffs2
(running on Linux).

By delaying to write of the logging information so that the classes 'cache'
data until either told to write by the system, or a time limit is reached,
we can dramatically reduce the amount of flash erasing done. I would like to
do this transparently to the end user, by perhaps writing a iostream class
that handles it all (with some extra bits to handle urgent shutdowns and
user requested flushes).

My question is this - does Boost provide anything that does this already (or
does anyone know of anything that does), or am I looking at this the wrong
way? Should I look at boost filesystem, and provide extra bits to implement
what we need? Alternatives?

James Hughes


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