#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "allvars.h"
#include "proto.h"
Go to the source code of this file.
Functions | |
void | allocate_commbuffers (void) |
void | allocate_memory (void) |
void | free_memory (void) |
Definition in file allocate.c.
|
Allocates a number of small buffers and arrays, the largest one being the communication buffer. The communication buffer itself is mapped onto various tables used in the different parts of the force algorithms. We further allocate space for the top-level tree nodes, and auxiliary arrays for the domain decomposition algorithm. < Maximum number of nodes in the top-level tree used for domain decomposition < Maximum number of nodes in the top-level tree used for domain decomposition < Maximum number of nodes in the top-level tree used for domain decomposition < Maximum number of nodes in the top-level tree used for domain decomposition < Maximum number of nodes in the top-level tree used for domain decomposition < Maximum number of nodes in the top-level tree used for domain decomposition < Maximum number of nodes in the top-level tree used for domain decomposition < Maximum number of nodes in the top-level tree used for domain decomposition < Maximum number of nodes in the top-level tree used for domain decomposition Definition at line 19 of file allocate.c. References All, global_data_all_processes::BufferSize, global_data_all_processes::BunchSizeDensity, global_data_all_processes::BunchSizeDomain, global_data_all_processes::BunchSizeForce, global_data_all_processes::BunchSizeHydro, CommBuffer, DensDataGet, DensDataIn, DensDataPartialResult, DensDataResult, DomainCount, DomainCountSph, DomainEndList, DomainHmax, DomainKeyBuf, DomainMoment, DomainNodeIndex, DomainPartBuf, DomainSphBuf, DomainStartList, DomainTask, DomainTreeNodeLen, DomainWork, endrun(), Exportflag, FLOAT, GravDataGet, GravDataIn, GravDataIndexTable, GravDataOut, GravDataResult, HydroDataGet, HydroDataIn, HydroDataPartialResult, HydroDataResult, MAXTOPNODES, NTask, peanokey, ThisTask, and TopNodes. Referenced by begrun(). |
|
This routine allocates memory for particle storage, both the collisionless and the SPH particles. Definition at line 103 of file allocate.c. References All, endrun(), global_data_all_processes::MaxPart, global_data_all_processes::MaxPartSph, P, SphP, and ThisTask. Referenced by read_file(), and restart(). |
|
This routine frees the memory for the particle storage. Note: We don't actually bother to call it in the code... When the program terminats, the memory will be automatically freed by the operating system. Definition at line 144 of file allocate.c. References All, global_data_all_processes::MaxPart, global_data_all_processes::MaxPartSph, P, and SphP. |