sort memory constraints