[Mono-dev] Problem handling more the 1024 file handle

Robert Jordan robertj at gmx.net
Fri Nov 4 07:14:22 EDT 2011


On 04.11.2011 11:18, Torello Querci wrote:
> Hy Robert,
>
> On 32bit arch IntPtr is 32bit, on 64 bit arch, IntPrt is 64 bit.

Yes, this is not the issue here.

>
> However I try your suggestion but the setrlimit no more work. Looking
> inside the strace output this is the setrlimit syscall:
>
> setrlimit(RLIMIT_NOFILE, {rlim_cur=20000, rlim_max=0}) = -1 EINVAL
> (Invalid argument)

Indeed, the p/invoked symbol "setrlimit" is always the 32 bit variant
on 32 bit systems.

C programs can change this with -D_FILE_OFFSET_BITS=64,
as Mono does, but this does not affect p/invoke.


Robert



More information about the Mono-devel-list mailing list