T3738 allocation figures for 32-bit

Daniel Fischer daniel.is.fischer at googlemail.com
Sat Apr 2 23:14:51 CEST 2011


In 7.0.3's testsuite, allT in perf/should_run says:
test('T3738',
     [stats_num_field('peak_megabytes_allocated', 1,
                                                  1),
                                     # expected value: 1 (amd64/Linux)
      # expected value: 12800 (x86/OS X):
      if_wordsize(32,
          stats_num_field('bytes allocated', 12700,
                                             14000)),
      if_wordsize(64,
          stats_num_field('bytes allocated', 60000,
                                             80000)),
                                     # expected value: 72608 (amd64/Linux)
      only_ways(['normal'])
      ],
     compile_and_run,
     ['-O'])

which looks quite amazing. On my linux box I consequently get

bytes allocated 60608 is more than maximum allowed 14000
*** unexpected failure for T3738(normal)

which looks quite horrible.
But considering that 6.12.3 allocated nearly 500,000 bytes for that, it's 
pretty fine.
In HEAD's testsuite, the figures have been adjusted to

      if_wordsize(32,
          stats_num_field('bytes allocated', 40000,
                                             50000)),

and HEAD does that, allocating 46008 bytes.

A trivial 'main = return ()'  produces

./nuff +RTS -s 
          47,496 bytes allocated in the heap
           1,376 bytes copied during GC
          34,036 bytes maximum residency (1 sample(s))
          19,212 bytes maximum slop

here

Apparently the allocation figures drastically vary by arch and OS, it would 
probably be necessary to test on several such and be more generous with the 
limits.

Cheers,
Daniel



More information about the Glasgow-haskell-users mailing list