in reply to Persistent stack implementation
A single, simple file and a lock seems all you need. You push by lock,append,unlock. You pop by lock,seek,read,truncate,unlock.
You don't say what types of values you want to store. But the worst case would be to write after each item (in a fixed-width format) the size of the previous item.
- tye
|
|---|