Skip to content
Snippets Groups Projects
Commit dec3b22e authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

add comment on the +100.

parent d806d119
No related branches found
No related tags found
1 merge request!284Space rebuild
...@@ -454,7 +454,9 @@ void space_rebuild(struct space *s, int verbose) { ...@@ -454,7 +454,9 @@ void space_rebuild(struct space *s, int verbose) {
struct cell *restrict cells_top = s->cells_top; struct cell *restrict cells_top = s->cells_top;
const int ti_current = (s->e != NULL) ? s->e->ti_current : 0; 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; const size_t ind_size = s->size_parts + 100;
int *ind; int *ind;
if ((ind = (int *)malloc(sizeof(int) * ind_size)) == NULL) if ((ind = (int *)malloc(sizeof(int) * ind_size)) == NULL)
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment