Skip to content

Commit

Permalink
Allocate less memory when gathering stack (kolide#1372)
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany authored Sep 28, 2023
1 parent 57d8023 commit 972479a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/debug/checkups/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func gatherStack(z *zip.Writer) error {
return fmt.Errorf("creating stack: %w", err)
}

buf := make([]byte, 1<<32)
buf := make([]byte, 1<<16)
stacklen := runtime.Stack(buf, true)
if _, err := out.Write(buf[0:stacklen]); err != nil {
return fmt.Errorf("writing file: %w", err)
Expand Down

0 comments on commit 972479a

Please sign in to comment.