Double the size of ARG_MAX on LP64 platforms.
As modern software keeps growing in size, we get requests to update the value of ARG_MAX in order to link the resulting object files. Other OSs have much higher values but Increasiong ARG_MAX has a multiplied effect on KVA, so just bumping this value is dangerous in some archs like ARM32 that can exhaust KVA rather easily. While it would be better to have a unique value for all archs, other OSs (Illumos in partidular) can have different ARG_MAX limits depending on the platform, For now we want to be really conservative so we are avoidng the change on ILP32 and in the alternative case we only double it since that seems to work well enough for recent Code Aster. I was planning to bump the _FreeBSD_version but it was bumped recently (r355798) so we can reuse the 1300068 value for this change. PR: 241710 MFC after: 5 days
This commit is contained in:
parent
84e6c29ca5
commit
1c10f3d9f4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355828
@ -48,7 +48,11 @@
|
||||
* Do not add any new variables here. (See the comment at the end of
|
||||
* the file for why.)
|
||||
*/
|
||||
#define ARG_MAX 262144 /* max bytes for an exec function */
|
||||
#ifndef __ILP32__
|
||||
#define ARG_MAX (2 * 256 * 1024) /* max bytes for an exec function */
|
||||
#else
|
||||
#define ARG_MAX (256 * 1024) /* max bytes for KVA-starved archs */
|
||||
#endif
|
||||
#ifndef CHILD_MAX
|
||||
#define CHILD_MAX 40 /* max simultaneous processes */
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user