My GGG, Private Helm was captured near Cumberland, MD., August 1, 1864; imprisoned Salisbury, Rowan, North Carolina and died Jan 12, 1865 (starvation.)
I'm not quite as good at Salisbury Prison as I am at Andersonville, but I know more than most people. Ed and Sue Curtis, founders of the Salisbury Confederate Prison Association (of which I am a card carrying member) are the undisputed experts, and most Aprils they hold a symposium on the prison.
As you said, if he died in January, 1865, he would have been buried in a trench grave. Unlike Andersonville, most of the men who died are buried anonymously in trenches, and there are no indication as to who might be buried where. The end of each trench is marked with a gravestone like the one in the picture. No one is exactly sure how many men lie buried there, but I think there are something like 17 markers at the end of the rows.
Since he was there in November, of 1864, your grandfather would have been there during a prison uprising. It was a plan for the prisoners to overtake the guards during a shift change and stage a mass break out, but it was poorly planned and executed. Most prisoners were not even aware of the plan, and close to 200 of them were killed. Some of the other prisoners even helped to stop the riot, because as soon as it started, the prison guards turned their cannons on the prisoners, but luckily the order to fire was not given, and so the affair ended.
The one thing that does stick out in my mind is that, although there were some building inside the prison, most had no shelter, and would dig holes in the ground to try to get shelter from the elements. One scholar described these holes as being shaped like "inverted light bulbs." Not terribly effective, but they did the best they could.