Hi James!
The problem was solved by fixing the errno problem as suggested by Diego,
but this information you gave is still very helpful for my project.
The size of len is indeed more or less the same as my current shmmax (32Mb).
Thanks,
Torbjoern
>
> How big is len?
>
>
> Try doing sysctl
Thanks Diego!
I never thought about that. As you guessed, errno
was indeed =2 already before the mmap call.
It works now and I'm very happy.
Regards,
Torbjoern
>
> > How can gtk_image_new_from_file and mmap be 'colliding'?
> They don't, I think. Just you
>
> After some testing, I found that the mmap call works fine, but only if
> I remove the 'my_image...' line in the code. It also works
> if I remove (or rename) the image, so that it cannot be read.
>
> How can gtk_image_new_from_file and mmap be 'colliding'
bly ok.
> How can gtk_image_new_from_file and mmap be 'colliding'?
They don't, I think. Just you're using the wrong test. AT LEAST init
errno to 0 just before the function call, but that's ugly. Better
testing the CORRECT result first and check errno only whe
at the mmap call works fine, but only if
I remove the 'my_image...' line in the code. It also works
if I remove (or rename) the image, so that it cannot be read.
How can gtk_image_new_from_file and mmap be 'colliding'?
The image is only 11k and I have 512Mb RAM.
I run debian linux