Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
17f75981
Commit
17f75981
authored
Nov 03, 2015
by
Pedro Gonnet
Browse files
fix bug found by peter where the stack can be smaller than the total number of threads.
parent
8eb61c4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/space.c
View file @
17f75981
...
...
@@ -492,7 +492,7 @@ void space_parts_sort(struct space *s, int *ind, int N, int min, int max) {
space_sort_struct
.
parts
=
s
->
parts
;
space_sort_struct
.
xparts
=
s
->
xparts
;
space_sort_struct
.
ind
=
ind
;
space_sort_struct
.
stack_size
=
2
*
(
max
-
min
)
+
10
;
space_sort_struct
.
stack_size
=
2
*
(
max
-
min
+
1
)
+
10
+
s
->
e
->
nr_threads
;
if
((
space_sort_struct
.
stack
=
malloc
(
sizeof
(
struct
qstack
)
*
space_sort_struct
.
stack_size
))
==
NULL
)
error
(
"Failed to allocate sorting stack."
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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