validate() to avoid conflicts with possible use of mmap by malloc(). Tested only on FreeBSD but should work ok on other platforms too.