[Mono-dev] StreamReader.ReadToEnd crashes sometimes
robertj at gmx.net
Fri Feb 4 08:57:39 EST 2011
On 04.02.2011 14:06, cs_eps wrote:
> Hallo experts!
> Once in a while StreamReader.ReadToEnd() crashes with the following stack
> Mprotect failed at 0x4621e000 (length 20480) with errno 12
> at (wrapper managed-to-native)
> object.__icall_wrapper_mono_array_new_specific (intptr,int)<0xffffffff>
Errno 12 is ENOMEM, a.k.a. "Out of memory".
> Is there a fix for this? or a workaround?
You may want to use ReadLine in a loop instead of slurping
the whole file into memory.
More information about the Mono-devel-list