Pre-allocate some memory in Large Object Heap memory?

You should use the StringBuilder object to work with strings, as it is a mutable string and provide many methods to work with it.

You should use the StringBuilder object to work with strings, as it is a mutable string and provide many methods to work with it. You are saying that every strings are created again and again. If, for some reason, you must use the strings, just Intern them - they will stored once, and will not be added on memory heap again.

2 Interning will only work it it's about many times the same string (from file(s)). Not too likely. – Henk Holterman Jun 11 '11 at 13:54 I've just say all the variants – VMAtm Jun 11 '11 at 16:04.

It's unclear what kind of actions you want to do with the strings, your best shot is an estimate of the final result(s). Use a pessimistic (large) estimate and maybe add a margin. Then create a StringBuilder with the capacity parameter: var buffer = new StringBuilder(LargestExpectedSize); This essentially is pre-allocation on the LOH.

Avoid (auto-)growing of StringBuilders or Lists.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions