Commit dec3b22e authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

add comment on the +100.

parent d806d119
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment