mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 17:55:08 +00:00

Some programs explicitly ask for a different initial stack size than what the OS provides. This is implemented in ELF by having a PT_GNU_STACK header which has its p_memsz set to the amount that the program requires. This commit implements this policy by reading the p_memsz of the header and setting the main thread stack size to that. ELF::Image::validate_program_headers ensures that the size attribute is a reasonable value.
12 lines
253 B
C
12 lines
253 B
C
/*
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
|
* Copyright (c) 2022, sin-ack <sin-ack@protonmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#define NGROUPS_MAX 32
|
|
|
|
#define PTHREAD_STACK_MIN (64 * 1024) // 64KiB
|