>Also, as a test, could you initialise the memory stream to roughly the size required to store the entire list<T> and see if it works then.
That works fine if I do it that way. But my problem is that I can't really know in advance how much memory the serialization will use, so it's not really a viable solution. I'm thinking of trying to split up my list into smaller chunks to see it this could fix the problem by avoiding the large object heap, if there is such a heap in mono.
Sounds like your problem is due to heap fragmentation. The only solution is to use a best-guess for the approximate size of the memory stream and initialise the memorystream to that to start off with. For example if the average size of your class is 68 bytes, then initialise the memorystream to array.Length * 68. Or some such thing. Still, a testcase may prove useful. Alan.
_______________________________________________ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list