Modify dynamic shared memory code to use Size rather than uint64.

This is more consistent with what we do elsewhere.