Skip to content

Commit 9dae9a6

Browse files
committed
Default -> length
1 parent dc87e26 commit 9dae9a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/ExMemoryUsage.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ addConstantRose (CostRose cost1 forest1) (CostRose cost2 forest2) =
306306

307307
instance {- ExMemoryUsage a => -} ExMemoryUsage [a] where
308308
-- sizeof([a]) = (1 + 3N) words + N * sizeof(v)
309-
memoryUsage _ = singletonRose 1
309+
memoryUsage l = singletonRose . fromIntegral $ length l
310310
{- = CostRose nilCost . map (addConstantRose consRose . memoryUsage) where
311311
-- As per https://wiki.haskell.org/GHC/Memory_Footprint
312312
nilCost = 1

0 commit comments

Comments
 (0)