[PATCH 1/1] makedevs: set path size to match linux
Ralf Friedl
Ralf.Friedl at online.de
Tue Jun 27 07:10:39 UTC 2017
Michael Conrad wrote:
> If you ask for large enough allocations on the stack, GCC will
> secretly give you malloc/free instead, which adds to code size. It
> might be that 4096 triggers this effect, and perhaps that was the
> reason for the original small-ish static buffer.
Do you have a reference for that? I just tried it, and GCC just
allocates memory from the stack no matter the size. Granted, it is a
64-bit system, but I used 0x1000000000000 (281474976710656) which should
be enough to trigger such a behavior even on a 64-bit system. In fact,
it is more than a current system can provide either in the stack or
through malloc.
More information about the busybox
mailing list