[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #YFC-341618]: Memory leak in NetCDF
- Subject: [netCDF #YFC-341618]: Memory leak in NetCDF
- Date: Tue, 17 Nov 2015 10:56:45 -0700
Hi,
Thanks for the report; it should of course be possible to get rid of the memory
leak, assuming we can identify it properly. Can you tell me what version of
the fortran and underlying C libraries you are using?
-Ward
>
> Dear Unidata support,
>
> We encountered a memory leak in a NetCDF interface for Fortran 90. The
> memory leak occurs when a there is an attribute that is a compound that
> contains a string. The memory is leaked when just opening and closing
> the file with nf90_open and nf90_close. Below, I will give an NCDUMP
> output of a small leaking NetCDF file.
>
> We already contacted the HDF5 support and the memory leak does not occur
> when reading the same file with just the HDF5 interface.
>
> For development, however, we prefer the nf90-interface above the
> h5-interface. Is there a possibility to get rid of the memory leak with
> the nf90-interface?
>
> NCDUMP output of a leaking NetCDF file:
> netcdf memory_leak {
> types:
> compound cmp {
> string content1 ;
> string content2 ;
> }; // cmp
> variables:
> float var ;
> cmp var:att = {"example", "X"} ;
> data:
>
> var = 5.2 ;
> }
>
> When opening and closing the file, 10 bytes of memory are leaked, equal
> to the sum of the string lengths (including termination characters).
>
> Thanks in advance,
> Joost
>
>
Ticket Details
===================
Ticket ID: YFC-341618
Department: Support netCDF
Priority: Normal
Status: Closed