Tighten memory restrictions and use int4 for mapping