Re: [PATCH] block/vpc: Avoid dynamic stack allocation

2023-08-18 Thread Kevin Wolf
Am 11.08.2023 um 19:52 hat Peter Maydell geschrieben: > From: Philippe Mathieu-Daudé > > Use autofree heap allocation instead of variable-length array on the > stack. Here we don't expect the bitmap size to be enormous, and > since we're about to read/write it to disk the overhead of the > alloca

Re: [PATCH] block/vpc: Avoid dynamic stack allocation

2023-08-18 Thread Francisco Iglesias
On [2023 Aug 11] Fri 18:52:29, Peter Maydell wrote: > From: Philippe Mathieu-Daudé > > Use autofree heap allocation instead of variable-length array on the > stack. Here we don't expect the bitmap size to be enormous, and > since we're about to read/write it to disk the overhead of the > allocati

[PATCH] block/vpc: Avoid dynamic stack allocation

2023-08-11 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Here we don't expect the bitmap size to be enormous, and since we're about to read/write it to disk the overhead of the allocation should be fine. The codebase has very few VLAs, and if we ca