New assertions and bug fix in DSD balancing.

This commit is contained in:
Alan Mishchenko
2015-01-27 09:54:35 -08:00
parent 8ff4b79fc2
commit 0f22046bcb
9 changed files with 90 additions and 16 deletions
+10
View File
@@ -91,6 +91,16 @@ static inline Vec_Ptr_t * Vec_PtrAlloc( int nCap )
p->pArray = p->nCap? ABC_ALLOC( void *, p->nCap ) : NULL;
return p;
}
static inline Vec_Ptr_t * Vec_PtrAllocExact( int nCap )
{
Vec_Ptr_t * p;
assert( nCap >= 0 );
p = ABC_ALLOC( Vec_Ptr_t, 1 );
p->nSize = 0;
p->nCap = nCap;
p->pArray = p->nCap? ABC_ALLOC( void *, p->nCap ) : NULL;
return p;
}
/**Function*************************************************************