[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sylpheed
Subject:    [sylpheed:27469] mlock() bug
From:       Christian Biere <christianbiere () gmx ! de>
Date:       2006-02-27 11:39:49
Message-ID: 20060227113949.GA328 () cyclonus
[Download RAW message or body]


Hi,

Sylpheed uses mlock() in a non-portable way which makes it ineffective
unless you have sufficient good luck. If you read the POSIX specification
of mlock() and munlock(), you'll see that the address to be locked
should be page-aligned:

http://www.opengroup.org/onlinepubs/007908799/xsh/mlock.html

See compat_page_align() for a portable way to get a page-aligned
chunk of memory:

http://cvs.sourceforge.net/viewcvs.py/gtk-gnutella/gtk-gnutella-current/src/lib/misc.c?rev=1.114

-- 
Christian

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic