mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
Check a memory allocatin
This commit is contained in:
parent
5892ce7738
commit
2e21bd9dfb
1 changed files with 4 additions and 0 deletions
|
@ -286,6 +286,10 @@ int main(int argc, char *argv[]) {
|
||||||
/* Now calculate volumes*/
|
/* Now calculate volumes*/
|
||||||
printf("Now finding volumes ...\n"); fflush(stdout);
|
printf("Now finding volumes ...\n"); fflush(stdout);
|
||||||
vols = (float *)malloc(nvp*sizeof(float));
|
vols = (float *)malloc(nvp*sizeof(float));
|
||||||
|
if (vols == NULL) {
|
||||||
|
printf("Unable to allocate vols\n");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
for (i=0; i<nvp; i++) { /* Just the original particles
|
for (i=0; i<nvp; i++) { /* Just the original particles
|
||||||
Assign adjacency coordinate array*/
|
Assign adjacency coordinate array*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue