On Mon, 11 Dec 2006 12:25:44 -0600 Dan Nelson <[EMAIL PROTECTED]> wrote:
> The FreeBSD 6.x behaviour is slightly against POSIX rules that state > all successful malloc calls must return unique pointers, so the 7.x > malloc silently rounds zero-size mallocs to 1. Ideally malloc would > return unique pointers to blocks of memory set to MPROT_NONE via > mprotect() (you could fit 8192 of these pointers in an 8k page), to Could you, really? I'm not a language lawyer, and this is a language-lawyer question, but I would have expected that the maximal alignment rule would prevent you from allocating more than 512 or 1024 "unique, valid" pointers in a page. Perhaps there is no alignment requirement on a zero-byte object? Just curious. I don't care about the actual implementation, and I thought that handing out a special MPROT_NONE page was a good idea... > prevent applications from using that byte of memory. Cheers, -- Andrew _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"