Home
Reply
Visitor
higherone
Posts: 4

Any method to know how much memory is taken by a BODY?

I need to store a set of BODYs in memory.but I want to estimate how much memory every BODY has taken.
Is there any method to query that information?
Visitor
higherone
Posts: 4

Re: Any method to know how much memory is taken by a BODY?

if it's hard to know the memory of every single BODY,Is there any method to know how much memory is taken by ACIS memory allocator ?I want to know this ,because i have to keep a list of BODYs in  momory .but if the system memory is running out,I can delete some of them.can u help?
Spatial Employee
Jeff
Posts: 38

Re: Any method to know how much memory is taken by a BODY?

ACIS (currently) does not have a function to determine the amount of storage used by a given set of entities. However, you may be able to obtain some useful information by customizing the ACIS memory manager. You can, for example, install a custom allocator and destructor through which you can determine the amount of storage consumed by a particular operation (e.g. restore). We provide example code in Scheme to help identify out of bounds memory writes (search for ‘raw_allocator’). This, along with the ACIS Memory Manger documentation, may provide useful insights. Also, all entity types have a size method that correctly returns the class object size of the given type (e.g. BODY, LUMP, SHELL, etc.). This however is of limited use because it does not include the storage used for geometry and other data referenced through pointers. (This is the data reported by the scheme debug function.)

Best regards,

Jeff