Skip to content

histogram diff: Fix memory ballooning in corner case

Stefan Beller git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xdiff/xhistogram: pass arguments directly to fall_back_to_classic_diffxdiff/xhistogram.c+11 -110 replies
2/3xdiff/xhistogram: factor out memory cleanup into free_index()xdiff/xhistogram.c+9 -40 replies
3/3xdiff/xhistogram: move index allocation into find_lcsxdiff/xhistogram.c+53 -431 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] histogram diff: Fix memory ballooning in corner case

Currently if you run

    seq 1   100000 >one
    seq 1 4 100000 >two
    git diff --no-index --histogram one two

you might run into memory issues. After applying the last patch of this series you only have to wait a bit (as it doesn't fix run time complexity), but computes the result with less memory pressure.

Thanks,
Stefan

Stefan Beller (3):
xdiff/xhistogram: pass arguments directly to fall_back_to_classic_diff xdiff/xhistogram: factor out memory cleanup into free_index() xdiff/xhistogram: move index allocation into find_lcs

 xdiff/xhistogram.c | 117 +++++++++++++++++++++++++--------------------
 1 file changed, 66 insertions(+), 51 deletions(-)
Signature · 1 line
2.18.0.233.g985f88cf7e-goog