[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #YLE-912828]: NETCDF: Memory/resource leak in nc4hdf.c, netcdf

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: [netCDF #YLE-912828]: NETCDF: Memory/resource leak in nc4hdf.c, netcdf
  • Date: Tue, 10 Feb 2009 07:41:49 -0700

> Hi!
>
> I just downloaded and ran the test on netcdf-4.0.1-beta1-snapshot2008112702,
> and am very happy to say that the memory leak seems to be patched!
>
> There is a much less serious sporadic and small increase in memory usage
> over multiple runs of nc_get_vara, but I haven't tracked down where this
> may be occurring (it could well be in the HDF5 library, or perhaps
> a result of heap fragmentation, though this really shouldn't be occuring
> in this context either.) It consists of very occasional
> jumps in usage of 80 to 120 or so bytes. Just to point it out,
> I've attached a log of a 2000-iteration loop over nc_get_vara_double (from
> the same leaktest code from before.)
>
> Best regards,
> Sam Yates
>
>

Howdy Sam!

I have traced these leaks and some others into the HDF5 library. I have started
a process of isolating and submitting them to the HDF5 team as bugs, and I'm
sure we can get most or all of them resolved before the next HDF5 release. But
for now, we will have to live with these small memory leaks in HDF5 1.8.2.

Thanks!

Ed

Ticket Details
===================
Ticket ID: YLE-912828
Department: Support netCDF
Priority: Critical
Status: Closed