I'm doing some moderately low-level programming of an embedded device that has some NVRAM we plan to use for retaining values between runs of a program. We'd like to abstract the operations into an API over a driver or talking to a daemon. This is lower-level than the serialization semantics I've seen here and there. Basically we want a process or function to be able to reserve some space (with some name or other identifier), store a value (arbitrary byte sequence) in that reserved space, retrieve the value later, and surrender the reservation if it no longer needs to use it. This feels a lot like malloc
, write
, read
, and free
. I'm tempted to implement nvAlloc()
(or something) and so on. Or am I missing something obvious? Maybe security: another process getting a handle and accessing or corrupting the value.
Asked
Active
Viewed 15 times
0

Chris Nelson
- 3,519
- 7
- 40
- 51
1 Answers
0
It seems http://pramfs.sourceforge.net/ and normal file system access are the right answer.

Chris Nelson
- 3,519
- 7
- 40
- 51