0

I am trying to limit the maximum memory used by PROMELA, by using the -DMEMLIMIT flag, like this.

./spin -a -DMEMLIMIT=1024 code.pml

But, still the memory keeps on increasing. Any idea, why is that so?

MetallicPriest
  • 29,191
  • 52
  • 200
  • 356
  • That `-DMEMLIMIT=1024` flag looks like it could be a compiler flag, not one you pass to the program. Do you have any documentation for this _spin_ program? – tangrs Jan 17 '14 at 11:29
  • Actually SPIN produces C Code for model checking. That C Code contains that MEMLIMIT flag, the purpose of which is to limit the memory usage. But from what I am seeing, memory is not being limited. – MetallicPriest Jan 17 '14 at 11:38
  • I'm looking at the manual for _spin_ but there's no mention of a `-D` flag. Maybe you meant to compile the generated C file/s with the `-DMEMLIMIT=1024` flag? – tangrs Jan 17 '14 at 12:04
  • http://spinroot.com/spin/Man/Roadmap.html. Actually its the same thing if you use the flag with spin or while compiling with gcc. I did both, and the result is the same. – MetallicPriest Jan 17 '14 at 13:00
  • 1
    The doc you linked to uses MEMLIM instead of MEMLIMIT. – ninjalj Jan 17 '14 at 14:51
  • That is the right :)! That was precisely the mistake I was doing. – MetallicPriest Jan 17 '14 at 15:07

1 Answers1

0

-DMEMLIM=N is a compiler flag passed to the gcc. It works that way:

./spin -a code.pml gcc -DMEMLIM=1024 -o pan pan.c ./pan

You can also add further flags to enforce a better compression of states, like for instance -DCOLLAPSE which is a quite fast way to reduce the amount of memory needed.

dsteinhoefel
  • 688
  • 4
  • 13
  • Also thee `-w` option to `pan`: "-wN hashtable of 2^N entries (defaults to -w24)". – 0 _ Jul 08 '14 at 17:31