NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/37943: posix_memalign doesn't work

The following reply was made to PR lib/37943; it has been noted by GNATS.

From: Magnus Henoch <>
Subject: Re: lib/37943: posix_memalign doesn't work
Date: Sun, 03 Feb 2008 16:53:41 +0100

 I now realize that this fails because 8192 is greater than the page size
 (4096), and malloc just allocates a number of whole pages.  The number
 8192 comes from glib, which tries to allocate memory with such great
 alignment if the configure script detects that posix_memalign doesn't
 return an error.
 So posix_memalign should either be fixed or give an error for alignment
 greater than 4096.  It's not clear to be (from reading the man page)
 what error it should give or whether it is even allowed to do so, but at
 least glib thinks it should.

Home | Main Index | Thread Index | Old Index