Basically, no, a Good character ideally should never torture, regardless of circumstances. Remember, D&D morals are absolute. You can make a case for torture being sometimes a necessary evil, but it is still evil. A Good character that is forced to torture someone should feel extremely bad about it, regardless of the reasons or the subject (though, naturally, isolated evil acts don't automatically make you Evil).
Marv, instead, enjoyed torturing. He does not qualify torture as a necessary evil. While the action may be the same, this fact alone is an extreme push towards Evil.
I categorize him as Neutral because of self-sacrifice, which is a very non-Evil action, and because he feels righteous anger at evil for evil's sake.
Also, IMHO, killing is virtually never a Good action, except for Evil outsiders, undead and similar creatures. Killing ordinary evil people is a Neutral action, and then only if the killing is arguably necessary to prevent them from committing further evil. See any of the N threads about paladins attacking anything that blips on their evilmeter.
It could be debatable that killing ultra-psychopaths such as the guy Elijah Wood played, or the bishop, is a Good action; I have no opinion on that. But killing run-of-the-mill criminals is Neutral at best. Ideal Good behaviour would be to redeem or confine them. If that sounds impractical - tough luck. There's a reason for which there aren't many saints around. Ordinary Good characters commit Neutral actions all the time.