allocating memory for processes