Memory model; mostly untested, but compiles.