JamesNK/Newtonsoft.Json — pull request #457 by fuyifan (2014-12-31 10:06:10+00:00)
Title: Update JToken.cs (JObject.ToString throws OutofMemory exception)

JObject.ToString throws OutofMemory exception, when JToken uses StringWriter to generate string and this string is quite large. If the StringWriter.length is larger than 120MB, exception occurs very often. The reason is that StringBulder uses StringBuilder as its base data structure and StringBuilder requires a continuous memory. If the StringBuilder cannot get such a continuous memory it will throw OutofMemory exception.