I think Kristina Marasovic wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi,
> 
> can someone tell me if it is possible (and how) to get or to measure the 
> size of an activation record.

You don't really know the size of *any* Java object, as the details of
object representation are implementation-dependent. Furthermore, it's
rather tricky to determine "the size of an object" when that object is
part of a dense interconnected web of objects like Jess's Rete
network. 

That said, in the current implementation, an Activation object has 4
members, which at 4 bytes each is 16 bytes. Along with the
generally-assumed Java memory overhead per object of 16 bytes, that
means each Activation is 32 bytes. If you have 756,000 of them, that's
24 MB. If you include the 4 byte array element that holds each
Activation, then that adds another 3 MB.

Now, each Activation record has a reference to a Defrule (which would
exist anyway) and a Token in the Rete network. If you want to start
including those Tokens in the memory count, then it becomes very
complicated very quickly, as many, many Tokens are shared, and also
Token is a recursive data structure -- a Token usually contains a
reference to another "parent" token. The depth of the recursion and
the amount of sharing is entirely dependent on the nature of your
rules. 




---------------------------------------------------------
Ernest Friedman-Hill  
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to