Merge pull request #549 from apple/release-5.2
Merge release-5.2 into master
This commit is contained in:
commit
b17c8359ec
|
@ -32,7 +32,7 @@ extensions = [
|
|||
'sphinx.ext.ifconfig',
|
||||
'brokenrole',
|
||||
'relativelink',
|
||||
'rubydomain'
|
||||
'sphinxcontrib.rubydomain'
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
|
|
|
@ -101,7 +101,7 @@ The default behavior when the certificate or key file is not specified is to loo
|
|||
Default Peer Verification
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The default peer verification is ``Check.Valid=0``.
|
||||
The default peer verification is ``Check.Valid=1``.
|
||||
|
||||
Default Password
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -495,6 +495,16 @@ inline static void* aligned_alloc(size_t alignment, size_t size) { return memali
|
|||
#elif defined(__APPLE__)
|
||||
#include <cstdlib>
|
||||
inline static void* aligned_alloc(size_t alignment, size_t size) {
|
||||
// Linux's aligned_alloc() requires alignment to be a power of 2. While posix_memalign()
|
||||
// also requires this, in addition it requires alignment to be a multiple of sizeof(void *).
|
||||
// Rather than add this requirement to the platform::aligned_alloc() interface we will simply
|
||||
// upgrade powers of 2 which are less than sizeof(void *) to be exactly sizeof(void *). Non
|
||||
// powers of 2 of any size will fail as they would on other platforms. This change does not
|
||||
// break the platform::aligned_alloc() contract as all addresses which are aligned to
|
||||
// sizeof(void *) are also aligned to any power of 2 less than sizeof(void *).
|
||||
if(alignment != 0 && alignment < sizeof(void *) && (alignment & (alignment - 1)) == 0) {
|
||||
alignment = sizeof(void *);
|
||||
}
|
||||
void* ptr = nullptr;
|
||||
posix_memalign(&ptr, alignment, size);
|
||||
return ptr;
|
||||
|
|
Loading…
Reference in New Issue