accessing the RTS -M flag value from GHC.RTS.Flags

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

accessing the RTS -M flag value from GHC.RTS.Flags

Adam Flott
Given,

    import GHC.RTS.Flags

    main = do
        gcf <- getRTSFlags
        print (maxHeapSize (gcFlags gcf))

And running on x86-64 in GHC 7.10.3,

    $ ./ghcflags
    0
    $ ./ghcflags +RTS -M1M
    256
    $ ./ghcflags +RTS -M1024K
    256
    $ ./ghcflags +RTS -M4096K
    1024

Is there anyway I can get access to the value stored in the -M flag
and depend on that value being correct? I was not able find it in the
user's guide or anywhere else for that matter.



Thanks,

Adam

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe