shared mem template