alloc_error.c File Reference

Dump the core of the program (to debug) in the event of a memory allocation error. More...

#include <misc.h>
Include dependency graph for alloc_error.c:

Go to the source code of this file.

Functions

void alloc_error (char *filename, int line)
 Subroutine to dump the core of the program (to debug) in the event of a memory allocation error.

Detailed Description

Dump the core of the program (to debug) in the event of a memory allocation error.

Definition in file alloc_error.c.


Function Documentation

void alloc_error ( char *  filename,
int  line 
)

Subroutine to dump the core of the program (to debug) in the event of a memory allocation error.

Parameters:
[in] filename Filename of source code file.
[in] line Line number.

Print error on standard error along with source code filename and line number.

Kill process and dump core for debugging purposes.

Definition at line 59 of file alloc_error.c.

Referenced by best_clusters(), change_date_origin(), clim_daily_tserie_climyear(), compute_time_info(), create_netcdf(), data_to_gregorian_cal_d(), data_to_gregorian_cal_f(), extract_subdomain(), extract_subperiod_months(), filter(), filter_window(), find_the_days(), generate_clusters(), get_attribute_str(), get_time_attributes(), get_time_info(), load_conf(), main(), mean_variance_dist_clusters(), mean_variance_field_spatial(), merge_seasons(), output_downscaled_analog(), project_field_eof(), read_analog_data(), read_field_subdomain_period(), read_large_scale_fields(), read_learning_fields(), read_learning_obs_eof(), read_learning_rea_eof(), read_netcdf_dims_3d(), read_netcdf_dims_eof(), read_netcdf_latlon(), read_netcdf_var_1d(), read_netcdf_var_2d(), read_netcdf_var_3d(), read_netcdf_var_3d_2d(), read_netcdf_var_generic_val(), read_netcdf_xy(), read_obs_period(), regress(), remove_clim(), remove_seasonal_cycle(), save_analog_data(), show_license(), sub_period_common(), write_learning_fields(), write_netcdf_dims_3d(), write_netcdf_var_3d(), write_netcdf_var_3d_2d(), write_regression_fields(), wt_downscaling(), wt_learning(), and xml_load_config().

00060 {
00067   (void) fprintf(stderr,"alloc_error: Memory allocation error (malloc)\n\nExiting and dumping core... File=%s Line=%d errno=%d\n\n",
00068                  filename, line, errno);
00069 
00071   (void) kill(getpid(), 5);
00072 }


Generated on 12 May 2016 for DSCLIM by  doxygen 1.6.1