summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2015-05-22 23:33:56 +0200
committerMark Wielaard <mjw@redhat.com>2015-05-27 23:04:31 +0200
commite69f59c6710c8861c2be95699e6e7806b1de2941 (patch)
tree646c568b771292817191bfbfeaeb20d4673ad3c7 /src/Makefile.am
parentf592035ea1e52328f0e14a3ddd5c4086cca6c775 (diff)
downloadelfutils-e69f59c6710c8861c2be95699e6e7806b1de2941.tar.gz
libdw: Limit stack usage of temporary dir, file and line lists.
Limit stack usage of lines with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with MAX_STACK_DIRS. Calculate number of dirs needed first, then create dirarray directly, without needing the next field. Free not stack allocated lines and files at the end. Use preallocated stack arrays for all instead of calling alloca to help compiler see actual stack usage. The current stack allocation limits are 4096 lines, 1024 files in 256 dirs per CU. For GCC 4.8 libstdc++.so has on average 512 lines per CU. With these settings read_srclines uses max 228K of stack on x86_64. Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'src/Makefile.am')
0 files changed, 0 insertions, 0 deletions