  _memory_profile - It shows the amount of memory used by every package.
     __________________________________________________________________

   _memory_profile [-f <filename>] [-h] [-p] [-u <units>]

   This command intregrates the output from purify with a function map
   generated by a perlscript plus another perlscript to generate a memory
   profile of NuSMV.

   This command relies on the output of purify to a file to call the
   script "memoryaccount" and produces a summary of how much memory has
   been allocated by each package. Although this command may appear simple
   it requires the interaction of two scripts and three files, so special
   care should be taken when attempting to modify it.

   Here is the way it works. The code in this command is conditionally
   compiled depending on the definition of the symbol PURIFY. If the
   symbol is not defined, the program prints a message notifying that the
   command is not operative in this executable. If PURIFY has been
   defined, there are certain things that are assumed. The executable has
   been linked with purify. The output of purify is being redirected to a
   file with name purify.log. The perl script memoryaccount is in
   $NuSMV_LIBRARY_PATH/common/share and it is executable. There exists a
   file whose name is .fmap, located in the same directory which script
   memoryaccount is located in. This file maps function names to packages
   which contain them.

   The command then calls purify_all_inuse() to force purify to dump to
   the file purify.log all information about the memory that is currently
   visible to the program. This memory is not the total memory allocated
   by the program since there may be leaked memory that is no longer
   accessible. A temporary file is created and the script memoryaccount is
   called to analyze the file purify.log and write in the temporary file
   the memory profile obtained from it. Once the script is done, the
   temporary file is dumped to nusmv_stdout and deleted.

   Since most of the computation in this command is done by the
   pearlscript memoryaccount, for more information please refer to the
   message printed when the script is invoked with the option -h. Command
   options:

   -f <filename>
          File to read the dump from. The default is purify.log. This
          option should be used if and only if the option -log-file has
          been used at the linking stage when building the executable.

   -p
          Prints also the packages that did not allocated any detectable
          memory

   -u <units>
          Units to print the memory usage in. It may be "b" for bytes, "k"
          for kilobytes, "m" for megabytes and "g" for gigabytes. The
          default is bytes.
     __________________________________________________________________

   Last updated on 2011/10/28 14h:49
