diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/libiberty.h | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 673f757..f48ed0a 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -2,6 +2,10 @@ * opcode/ppc.h (PPC_OPCODE_E200Z4): New define. +2016-07-29 Aldy Hernandez <aldyh@redhat.com> + + * libiberty.h (MAX_ALLOCA_SIZE): New macro. + 2016-07-27 Graham Markall <graham.markall@embecosm.com> * opcode/arc.h: Add ARC_OPERAND_ADDRTYPE, diff --git a/include/libiberty.h b/include/libiberty.h index 8f7d5f6..5b686ba 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -397,6 +397,17 @@ extern void hex_init (void); /* Save files used for communication between processes. */ #define PEX_SAVE_TEMPS 0x4 +/* Max number of alloca bytes per call before we must switch to malloc. + + ?? Swiped from gnulib's regex_internal.h header. Is this actually + the case? This number seems arbitrary, though sane. + + The OS usually guarantees only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + allocate anything larger than 4096 bytes. Also care for the possibility + of a few compiler-allocated temporary stack slots. */ +#define MAX_ALLOCA_SIZE 4032 + /* Prepare to execute one or more programs, with standard output of each program fed to standard input of the next. FLAGS As above. |