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
46b9eceb
Commit
46b9eceb
authored
Sep 12, 2016
by
Peter W. Draper
Browse files
Add some sanity checking when splitting cells.
This depth is way beyond our precision.
parent
44194d4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/space.c
View file @
46b9eceb
...
...
@@ -1269,6 +1269,12 @@ void space_split_mapper(void *map_data, int num_elements, void *extra_data) {
atomic_cas
(
&
s
->
maxdepth
,
maxdepth
,
c
->
depth
);
}
/* If the depth is too large, we have a problem and should stop. */
if
(
s
->
maxdepth
>
space_cell_maxdepth
)
{
error
(
"Exceeded maximum depth (%d) when splitting cells, aborting"
,
space_cell_maxdepth
);
}
/* Split or let it be? */
if
(
count
>
space_splitsize
||
gcount
>
space_splitsize
)
{
...
...
src/space.h
View file @
46b9eceb
...
...
@@ -44,6 +44,9 @@
#define space_stretch 1.10f
#define space_maxreldx 0.25f
/* Maximum allowed depth of cell splits. */
#define space_cell_maxdepth 52
/* Split size. */
extern
int
space_splitsize
;
extern
int
space_maxsize
;
...
...
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