-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hrvoje Niksic wrote:
> Micah Cowan <[EMAIL PROTECTED]> writes:
> 
>> Actually, I was wrong though: sometimes mmap() _is_ failing for me
>> (did just now), which of course means that everything is in resident
>> memory.
> 
> I don't understand why mmapping a regular would fail on Linux.  What
> error code are you getting?

ENOMEM, based on my recollection of the strerror message; I'm not
currently writing from the machine from which I produced this failure,
and haven't reproduced it here. I had been running a version with a
debug_logprintf() to complain about mapping failures; I believe I may
check that code in, as it could be potentially useful information.

Which is a bit odd, since I didn't get that the first time or two I ran
it. I suspect there may have been a bit of kernel oddness or something.

In any case, though, we should assume mmap() could fail. It's certainly
possible for a file to be large enough that it cannot be mapped into memory.

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGsPKo7M8hyUobTrERCA8+AJ9fthyjdoCPUybkw1J8zgrJdZoL3QCfRgNl
9G7RAKV3ZE7oATOtlxAF/nQ=
=4iDo
-----END PGP SIGNATURE-----

Reply via email to