From e9d0466494cbf7a707a450a7e058a0ae4c652f8b Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 5 Sep 2013 15:39:18 -0700 Subject: Updates for the new BMC engine. --- src/aig/gia/giaMan.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/aig/gia/giaMan.c') diff --git a/src/aig/gia/giaMan.c b/src/aig/gia/giaMan.c index a573e9e7..58057136 100644 --- a/src/aig/gia/giaMan.c +++ b/src/aig/gia/giaMan.c @@ -127,6 +127,27 @@ void Gia_ManStop( Gia_Man_t * p ) ABC_FREE( p ); } +/**Function************************************************************* + + Synopsis [Returns memory used in megabytes.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +float Gia_ManMemory( Gia_Man_t * p ) +{ + word Memory = sizeof(Gia_Man_t); + Memory += sizeof(Gia_Obj_t) * Gia_ManObjNum(p); + Memory += sizeof(int) * Gia_ManCiNum(p); + Memory += sizeof(int) * Gia_ManCoNum(p); + Memory += sizeof(int) * p->nHTable * (p->pHTable != NULL); + return (float)(int)(Memory / (1 << 20)) + (float)(1e-6 * (int)(Memory % (1 << 20))); +} + /**Function************************************************************* Synopsis [Stops the AIG manager.] -- cgit v1.2.3