ASCOT5
Loading...
Searching...
No Matches
libascot_mem.c
Go to the documentation of this file.
1
5#include <stdlib.h>
6#include "libascot_mem.h"
7#include "particle.h"
8
17 return (input_particle*) malloc(nmrk * sizeof(input_particle) );
18}
19
28 return (particle_state*) malloc(nmrk * sizeof(particle_state) );
29}
30
39 return ( real* ) malloc( size * sizeof(real) );
40}
41
42
48void libascot_deallocate(void *arr) {
49 free(arr);
50}
double real
Definition ascot5.h:85
particle_state * libascot_allocate_particle_states(int nmrk)
A routine to allocate an array of particle states.
input_particle * libascot_allocate_input_particles(int nmrk)
A routine to allocate an array of input particles.
real * libascot_allocate_reals(size_t size)
A routine to allocate an array of reals.
void libascot_deallocate(void *arr)
A wrapper to C stdlib free()
Header file for libascot_mem.c.
Header file for particle.c.
Wrapper for marker structs.
Definition particle.h:186
General representation of a marker.
Definition particle.h:40