Various fixes for Illumos Hipster 20151003.

This commit is contained in:
John Hood
2016-01-17 23:18:05 -05:00
parent dbbed24d83
commit 6fd570f81f
7 changed files with 62 additions and 65 deletions
+3
View File
@@ -65,6 +65,9 @@ AlignedBuffer::AlignedBuffer( size_t len, const char *data )
: m_len( len ), m_allocated( NULL ), m_data( NULL )
{
#if defined(HAVE_POSIX_MEMALIGN)
if ( len == 0 ) {
len = 1;
}
if ( ( 0 != posix_memalign( &m_allocated, 16, len ) )
|| ( m_allocated == NULL ) ) {
throw std::bad_alloc();