Ticket #4126: 0002-do-not-avoid-big-stack-allocations.patch

File 0002-do-not-avoid-big-stack-allocations.patch, 985 bytes (added by ossi, 22 months ago)
  • src/subshell/common.c

    From c473e97e0fff4a5d51feaf8418d624fd9a82eb72 Mon Sep 17 00:00:00 2001
    From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
    Date: Thu, 8 Oct 2020 13:24:59 +0200
    Subject: [PATCH 2/7] do not avoid big stack allocations
    
    these are cheap and unproblematic (we aren't in the kernel here).
    
    amends ff0fc17a.
    ---
     src/subshell/common.c | 5 ++---
     1 file changed, 2 insertions(+), 3 deletions(-)
    
    diff --git a/src/subshell/common.c b/src/subshell/common.c
    index 33c16fdb3..1d422999e 100644
    a b synchronize (void) 
    509509static gboolean 
    510510read_command_line_buffer (gboolean test_mode) 
    511511{ 
    512     /* Make static to avoid allocation of large buffers in the stack each time */ 
    513     static char subshell_command_buffer[BUF_LARGE]; 
    514     static char subshell_cursor_buffer[BUF_SMALL]; 
     512    char subshell_command_buffer[BUF_LARGE]; 
     513    char subshell_cursor_buffer[BUF_SMALL]; 
    515514 
    516515    fd_set read_set; 
    517516    int i;