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
dec3b22e
Commit
dec3b22e
authored
Dec 04, 2016
by
Pedro Gonnet
Browse files
add comment on the +100.
parent
d806d119
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/space.c
View file @
dec3b22e
...
...
@@ -454,7 +454,9 @@ void space_rebuild(struct space *s, int verbose) {
struct
cell
*
restrict
cells_top
=
s
->
cells_top
;
const
int
ti_current
=
(
s
->
e
!=
NULL
)
?
s
->
e
->
ti_current
:
0
;
/* Run through the particles and get their cell index. */
/* Run through the particles and get their cell index. Allocates
an index that is larger than the number of particles to avoid
re-allocating after shuffling. */
const
size_t
ind_size
=
s
->
size_parts
+
100
;
int
*
ind
;
if
((
ind
=
(
int
*
)
malloc
(
sizeof
(
int
)
*
ind_size
))
==
NULL
)
...
...
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