diff options
Diffstat (limited to 'src/misc/vec/vecInt.h')
-rw-r--r-- | src/misc/vec/vecInt.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h index 3e195bd3..e37743c5 100644 --- a/src/misc/vec/vecInt.h +++ b/src/misc/vec/vecInt.h @@ -96,6 +96,16 @@ static inline Vec_Int_t * Vec_IntAlloc( int nCap ) p->pArray = p->nCap? ABC_ALLOC( int, p->nCap ) : NULL; return p; } +static inline Vec_Int_t * Vec_IntAllocExact( int nCap ) +{ + Vec_Int_t * p; + assert( nCap >= 0 ); + p = ABC_ALLOC( Vec_Int_t, 1 ); + p->nSize = 0; + p->nCap = nCap; + p->pArray = p->nCap? ABC_ALLOC( int, p->nCap ) : NULL; + return p; +} /**Function************************************************************* |