Re: [PATCH v2 02/11] chardev/baum: Use definitions to avoid dynamic stack allocation

2022-10-24 Thread Richard Henderson
On 8/20/22 01:39, Peter Maydell wrote: From: Philippe Mathieu-Daudé We know 'x * y' will be at most 'X_MAX * Y_MAX' (which is not a big value, it is actually 84). Instead of having the compiler use variable-length array, declare an array able to hold the maximum 'x * y'. Signed-off-by: Philippe

[PATCH v2 02/11] chardev/baum: Use definitions to avoid dynamic stack allocation

2022-08-19 Thread Peter Maydell
From: Philippe Mathieu-Daudé We know 'x * y' will be at most 'X_MAX * Y_MAX' (which is not a big value, it is actually 84). Instead of having the compiler use variable-length array, declare an array able to hold the maximum 'x * y'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André