Strings in RAMS

In UML/MOF the String is an elementary type. It can have arbitrary length.

Ideas for implementations:

Strings as memory chunks

struct memchunk { size_t size; char mem[]; } is a variable length structure, and typedef memchunk String; is a specialisation.

Getters can return const RAMS::String &, there is no need for coppying.

use of std::string

The persistent structure is also a memory chunk, but the getter copies the return value into a memory.

The std::string may be allocated in a special pool.

Read only Strings in a persistent Memory pool

Java-like: We alloc Strings only once and in the reference structures there is only the id.

Bounded strings

For often changing strings the bounding strings will save a lot of dynamic.

dynamic page oriented memory management

greater dynamic objects will allocate one or more pages in its segment. After the static part will be a sequence of memory chunks. In the static part there is a relative pointer to the head of the free list.

When the are many changes, we will have the problem of fragmentation.

In paging systems, operation in the page are cheap. Thus, we could have defragmentation phases.