Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slash
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
slash
Commits
52ba5c2e
Unverified
Commit
52ba5c2e
authored
Oct 16, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make stack size a multiple of the page size
Should fix #27
parent
382bb91d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
fellow_testenv.c
src/fellow_testenv.c
+10
-1
No files found.
src/fellow_testenv.c
View file @
52ba5c2e
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include <signal.h>
#include <signal.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <unistd.h>
#include "fellow_testenv.h"
#include "fellow_testenv.h"
...
@@ -54,8 +55,16 @@ static pthread_attr_t attr;
...
@@ -54,8 +55,16 @@ static pthread_attr_t attr;
static
void
__attribute__
((
constructor
))
static
void
__attribute__
((
constructor
))
attr_init
(
void
)
attr_init
(
void
)
{
{
size_t
pg
,
sz
;
pg
=
(
size_t
)
sysconf
(
_SC_PAGESIZE
);
pg
--
;
sz
=
(
size_t
)
64
*
1024
;
sz
+=
pg
;
sz
&=
~
pg
;
AZ
(
pthread_attr_init
(
&
attr
));
AZ
(
pthread_attr_init
(
&
attr
));
AZ
(
pthread_attr_setstacksize
(
&
attr
,
(
size_t
)
64
*
1024
));
AZ
(
pthread_attr_setstacksize
(
&
attr
,
sz
));
AZ
(
pthread_attr_setdetachstate
(
&
attr
,
PTHREAD_CREATE_DETACHED
));
AZ
(
pthread_attr_setdetachstate
(
&
attr
,
PTHREAD_CREATE_DETACHED
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment