leaky

Robust space leak, and its strictification http://fremissant.net/leaky

Latest on Hackage:0.4.0.0

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed by Andrew G. Seniuk
Maintained by Andrew Seniuk


This leaky mini-project provides a Haskell program exhibiting classic
space leak behaviour. It leaks in GHC 7.8.3 (and lower), even when
compiled -O2.


leaky-min-cppd.hs - a tiny Haskell program that leaks in GHC 7.8.3 -O2
leaky-min.hs - like leaky-min-cppd.hs, with some alternatives
leaky.hs - a similar but elaborated example, with .cabal flags


In addition to the source files, more information can be found
at the http://www.fremissant.net/leaky project homepage,
including discussion links (cafe, reddit, etc.).

There may also be a community-editable version at the
https://www.haskell.org/haskellwiki/Space_Leak wiki page.


Configure and build in place:

> cabal get leaky # download and unpack leaky
> cd leaky-0.1.0.0 # (or whatever version it is)
> cabal configure && cabal build # build in place

Run by supplying a seed for the random number generator:

> ./dist/build/leaky/leaky 234


Or you may prefer to build in a sandbox:

> cabal get leaky
> cd leaky-0.1.0.0
> cabal sandbox init
> cabal install --only-dependencies
> cabal install

And to run:

> ./.cabal-sandbox/bin/leaky 234


NOTE: If you don't build with Cabal, you will need to
put options from leaky.cabal into your command line.

Anyway, seqaid uses both the Cabal library and
the cabal executable, meaning that only FORCING_STRATEGY
from 0 through 3 (refer to leaky.cabal) can work
wtihout the presence of the leaky.cabal file.


The output is explained at http://www.fremissant.net/leaky/output.html
or in the corresponding local document ./HTML/output.html.


The FORCING_STRATEGY CPP macro currently controls the leak and plug
variants, which are best set by editing the leaky.cabal file,reconfiguring
and rebuilding (or reinstalling in the case of a sandbox). See the
included file rough-fs-twiddling-guide.txt for more details.

There are also some constants in leaky.hs you may like to adjust.


If you have a version of the compiler that does not leak for
the default variant of leaky, please let me know at rasfar@gmail.com,
or on the reddit discussion:

http://www.reddit.com/r/haskell/comments/2pscxh/ann_deepseqbounded_seqaid_leaky/

It's nice to share your thoughts.


Sept. 20, 2014 / Dec. 2014
Andrew Seniuk
rasfar on #haskell


Changes


** 0.3.0.3 -> 0.4.0.0
- deepseq-bounded major version bump again (OverloadedStrings! yummy)
- there'll be two or three of these over the next month or so, then
thing'll likely get pretty quiet

0.3.0.2 -> 0.3.0.3
- figured out a few tricks
- hopefully this upload is the ticket; sorry for the extra version uploads
- cpphs is now again REQUIRED
----
- almost out of ideas...
- (determined to thwart the rogue build reporter)
- a non-Simple build type might help
- might help by simply getting ignored by this builder,
for one thing -- but who else might it affect adversely?...
- ghc-paths won't help since that info isn't accessible in
the .cabal file anyway -- there's very little to help us there
it seems
- I'm trying to use env, but the trouble is, the -optP args
are reordered by GHC
- in particular, the -D options are always first, which
ruins the hack since env chokes on those
- if only we could write -pgmP"env PATH=$PATH:blah cpphs"!

0.3.0.1 -> 0.3.0.2
- once more...

0.3.0.0 -> 0.3.0.1
- I'll buck this cowboy yet...

** 0.2.1.1 -> 0.3.0.0
- deepseq-bounded major version bump

0.2.1.0 -> 0.2.1.1
- non-manual USE_CPPHS flag added (also in seqaid and in deepseq-bounded)
so that client build system can decide whether cpp is available, or
it needs to install and use cpphs

0.2.0.1 -> 0.2.1.0
- realised I should be using "manual:true" in all my .cabal flags,
or else the constraint solver is free to toggle them!!

0.2.0.0 -> 0.2.0.1
- added a note in the .cabal description field, about the
rogue build failure report

** 0.1.7.0 -> 0.2.0.0
- deepseq-bounded had a major version bump
- fixed cpphs missing dependency for seqaid (also affects this package)
- more...

comments powered byDisqus