Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
b2750260
Commit
b2750260
authored
Oct 20, 2010
by
Simon Marlow
Browse files
add test for
#4334
(space leak in Data.List.lines)
parent
f1564fa2
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/perf/space_leaks/T4334.hs
0 → 100644
View file @
b2750260
module
Main
(
main
)
where
import
System.Environment
(
getArgs
)
mkText
::
Int
->
Int
->
Char
->
String
mkText
ll
ln
c
=
unlines
$
[
replicate
k
c
|
k
<-
[
ll
..
ll
+
ln
]]
main
::
IO
()
main
=
do
args
<-
getArgs
let
(
ll
,
ln
,
c
)
=
case
args
of
(
a1
:
a2
:
a3
:
_
)
->
(
read
a1
,
read
a2
,
head
a3
)
(
a1
:
a2
:
_
)
->
(
read
a1
,
read
a2
,
'a'
)
(
a1
:
_
)
->
(
read
a1
,
3
,
'b'
)
_
->
(
100000
,
5
,
'c'
)
mapM_
(
print
.
length
)
(
lines
$
mkText
ll
ln
c
)
testsuite/tests/ghc-regress/perf/space_leaks/T4334.stdout
0 → 100644
View file @
b2750260
1000000
1000001
1000002
testsuite/tests/ghc-regress/perf/space_leaks/all.T
View file @
b2750260
...
...
@@ -21,3 +21,11 @@ test('space_leak_001',
compile_and_run
,
[''])
test
('
T4334
',
# Test for a space leak in Data.List.lines (fixed with #4334)
[
extra_run_opts
('
1000000 2 t
'),
stats_num_field
('
peak_megabytes_allocated
',
1
,
3
),
# prof ways don't work well with +RTS -V0
omit_ways
(['
profc
','
profasm
','
profthreaded
'])
],
compile_and_run
,
[''])
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment