summaryrefslogtreecommitdiffstats
path: root/src/misc/vec/vecWec.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/vec/vecWec.h')
-rw-r--r--src/misc/vec/vecWec.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/misc/vec/vecWec.h b/src/misc/vec/vecWec.h
index f2fe3216..b09852ff 100644
--- a/src/misc/vec/vecWec.h
+++ b/src/misc/vec/vecWec.h
@@ -95,6 +95,16 @@ static inline Vec_Wec_t * Vec_WecAlloc( int nCap )
p->pArray = p->nCap? ABC_CALLOC( Vec_Int_t, p->nCap ) : NULL;
return p;
}
+static inline Vec_Wec_t * Vec_WecAllocExact( int nCap )
+{
+ Vec_Wec_t * p;
+ assert( nCap >= 0 );
+ p = ABC_ALLOC( Vec_Wec_t, 1 );
+ p->nSize = 0;
+ p->nCap = nCap;
+ p->pArray = p->nCap? ABC_CALLOC( Vec_Int_t, p->nCap ) : NULL;
+ return p;
+}
static inline Vec_Wec_t * Vec_WecStart( int nSize )
{
Vec_Wec_t * p;