[Mono-dev] Should we replace MemoryStream?

Miguel de Icaza miguel at novell.com
Mon Nov 9 14:48:30 EST 2009


Hello,

> Probably stupid question: why is a compacting garbage collector
> actually needed?  C programs have survived for a *long* time without
> any ability whatsoever to compact memory, simply by carefully
> optimizing their allocation algorithms to avoid fragmentation.  Is the
> mono allocator very non-optimal in this respect?

Long running applications tend to have this problem.

Either people ignore the problem, or they come up with some creative
solutions, and the solutions are all over the map.

In some cases, for long running processes, people split work into
separate processes and recycle the processes (for example Apache) in
other cases, they use custom memory allocation, pre-allocated pools, or
mark/release pools.





More information about the Mono-devel-list mailing list