summaryrefslogtreecommitdiffstats
path: root/src/H5MM.c
Commit message (Collapse)AuthorAgeFilesLines
* Trim trailing whitespaceQuincey Koziol2020-04-201-1/+1
|
* Revise API for H5get_alloc_stats() to take a struct instead of separate values.Quincey Koziol2020-03-201-39/+14
|
* Add routines to query the library's free list sizes and allocation stats.Quincey Koziol2020-03-101-3/+71
|
* Updated the 'const memory free' changes based on PR feedback.Dana Robinson2020-01-311-3/+2
|
* Added a free wrapper that lets us free constant pointers withoutDana Robinson2020-01-301-0/+26
| | | | | | | generating warnings. Also, brought the const-ness of the VOL connector info in line with the VFD info (not visible externally).
* Updated configure & CMake compiler flags for GCC 8.x, along with correspondingQuincey Koziol2019-06-281-5/+5
| | | | | changes to warnhist script (and some extra improvements for condensing C++ and Java warnings), and fixed a bunch of warnings.
* Put the memcpy overlap check back into H5MM.Dana Robinson2019-06-221-5/+3
|
* Commented out memcpy overlap check while we investigateDana Robinson2019-03-191-0/+5
| | | | parallel filters issues.
* Yanked check for memcpy n > 0Dana Robinson2019-03-171-1/+0
|
* - Added H5MMprivate.h #includes where neededDana Robinson2019-03-161-2/+4
| | | | | - Added casts to quiet H5MM_memcpy warnings - Removed char * casts from HDmemcpy
* Added an H5MM_memcpy call that checks for buffer overlap.Dana Robinson2019-03-161-5/+37
|
* Removed asserts from H5MM calls that conflict with stated behaviorDana Robinson2017-11-091-7/+1
| | | | and added a test to ensure that this doesn't happen in the future.
* Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to ↵Larry Knox2017-04-251-6/+4
| | | | | | | | | | hdf5_1_10 * commit '54957d37f5aa73912763dbb6e308555e863c43f4': Commit copyright header change for src/H5PLpkg.c which was added after running script to make changes. Add new files in release_docs to MANIFEST. Cimmit changes to Makefile.in(s) and H5PL.c that resulted from running autogen.sh. Merge pull request #407 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1 Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
* [svn-r30113] Description:Quincey Koziol2016-06-281-4/+4
| | | | | | | | Clean up warnings (from 2774 -> 1560, with my standard debug build) Tested on: MacOSX/64 10.11.5 (amazon) w/serial, parallel & production (h5committest forthcoming)
* [svn-r29182] Re-commit of HDFFV-8740 fix, which adds the ability to configureDana Robinson2016-02-221-23/+21
| | | | | | | | | | | | external dataset storage path behavior. This check-in fixes a bug in the original check-in where the external path stored in the file struct was not copied on reopen causing subsequent dataset operations to fail. Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 autotools serial w/ fortran and C++ autotools parallel (MPICH 3.1.4) w/ fortran
* [svn-r29084] Revert of:Dana Robinson2016-02-111-21/+23
| | | | | | | | | | | | | | | r29069 and 72 (gheap cleanup) r29041 and 43 (HDFFV-8740 external storage) These cause problems in the daily tests. They will be re-introduced when their respective problems have been addressed. Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 autotools serial (check-vfd) w/ Fortran and C++ autotools parallel w/ Fortran CMake serial
* [svn-r29041] Patch from Steffen Kiess that allows a relative path to be ↵Dana Robinson2016-02-041-23/+21
| | | | | | | | | | | specified for external dataset files set via H5Pset_external(). Resolves HDFFV-8740 Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 autotools serial
* [svn-r28824] Description:Quincey Koziol2016-01-061-3/+0
| | | | | | | Reduce asserts on buffer alignment. Tested on: Linux/32 & Linux/64 2.6.x (jam & myall) w/serial
* [svn-r28819] Description:Quincey Koziol2016-01-061-14/+22
| | | | | | | | | Align internal memory sanity checking buffer, to avoid problems when optimization is enabled. Tested on: MacOSX/64 10.11.2 (amazon) w/serial & parallel Linux/32 2.6.x (jam) w/serial
* [svn-r28815] Description:Quincey Koziol2016-01-061-0/+25
| | | | | | | | | | Add internal routine to sanity check all blocks allocated through H5MM interface. Tested on: Linux/32 2.6.x (jam) w/serial Linux/64 2.6.x (mayll) w/serial MacOSX/64 10.11.2 (amazon) w/serial & parallel
* [svn-r28790] Description:Quincey Koziol2016-01-041-2/+2
| | | | | | | | Correct non-portable 'SIZE_T_MAX' to 'SIZET_MAX'. Tested on: Linux/32 2.6.x (jam) w/default compilers (h5committest forthcoming)
* [svn-r28777] Description:Quincey Koziol2016-01-031-17/+306
| | | | | | | | | | Add --enable-memory-alloc-sanity-check option to configure, to track and sanity check memory allocations within the library. This is orthogonal to the --enable-using-memchecker option and can be used with/without it. Tested on: MacOSX/64 10.11.2 (amazon) w/serial & parallel (h5committest forthcoming)
* [svn-r28629] Minor normalization with revise_chunks.Dana Robinson2015-12-141-20/+15
| | | | | | | Tested on: Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 serial only (these changes have been in revise_chunks for a long time)
* [svn-r26392] Reinstates r26327-8, which had been reverted due to failures onDana Robinson2015-03-091-52/+69
| | | | | | | | | | | | | | Solaris and OS X. Added public API functions that expose the C library's memory allocator for use in filter functions that need to allocate or resize buffers. Intended for use with filter plugins, particularly on Windows, where C runtime (CRT) issues can cause problems. Fixes: HDFFV-9100 Tested on: h5committest + OS X (quail) + Solaris (emu)
* [svn-r26331] Revert checking r 26327&8, which added new code and test that ↵Larry Knox2015-02-281-62/+52
| | | | | | fails on solaris and macs. Tested h5committest + emu and quail.
* [svn-r26327] Added public API functions that expose the C library's memory ↵Dana Robinson2015-02-271-52/+62
| | | | | | | | | | | | allocator for use in filter functions that need to allocate or resize buffers. Intended for use with filter plugins, particularly on Windows, where C runtime (CRT) issues can cause problems. Fixes: HDFFV-9100 tested on: jam (minor, localized change)
* [svn-r23713] Description:Quincey Koziol2013-05-211-2/+2
| | | | | | | | | | Clean up warnings, switch library code to use Standard C/POSIX wrapper macros, remove internal calls to API routines, update checkapi and checkposix scripts. Tested on: Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN Big-Endian Linux/64 (ostrich)
* [svn-r21919] Description:Quincey Koziol2012-02-091-10/+10
| | | | | | | | Refactor function name macros and simplify the FUNC_ENTER macros, to clear away the cruft and prepare for further cleanups. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug, production & parallel
* [svn-r21496] - H5MM_strdup() and H5MM_xstrdup() comments changed to ↵Dana Robinson2011-10-091-28/+25
| | | | | | | | correctly reflect how they respond to an input NULL string. - H5MM_xstrdup() now reports memory allocation errors via the HDF5 error stack (was previously an assert). Tested on local Windows via ctest (trivial change).
* [svn-r20885] Description:Quincey Koziol2011-05-201-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring Coverity changes back to trunk: r20340: Address coverity issue 248. Set freed pointer to NULL if realloc fails, then check for NULL before attempting to close array of handles stored in memory addressed by pointer. r20341: Added initialization udata.path = NULL; udata.visited = NULL; to prevent unintialized use after done: label. Do C-style initialization AFTER all variable definitions. r20342: Fix valgrind error in H5DUMP-XML-tall.h5 r20343: Addressed Coverity issue 591 - check the return value of H5S_SELECT_ITER_RELEASE. r20344: Added initialization udata.path = NULL; to prevent uninitialized used after done: label r20347: Purpose: Fix memory leak in overhead.c Description: Fixed leak in test() in overhead.c where array "had" was never freed. r20348: Addressed Coverity issue 705 - added prototype for resize_configs_are_equal to cache_common.h. r20392: Purpose: Fix coverity issues 1677 and 1678 Description: Added return value checking for 4 funciton calls in H5tools_get_symlink_info(). r20394: Purpose: Fix coverity issues 1674 and 1675 Description: Modified H5Epush2() and H5E_printf_stack() to keep track of whether va_start() has been called, and to call va_end() at the end if so. r20395: Should be H5MM_calloc(count * sizeof(void*)). Fixed --gh r20396: Should be H5MM_calloc(count * sizeof(void*)). Fixed. --gh Tested on: Mac OSX/32 10.6.7 (amazon) w/debug & production (h5committested on branch)
* [svn-r18206] Description:Quincey Koziol2010-02-031-18/+13
| | | | | | | | Removed assert() statement when HDrealloc() returned NULL in H5MM_realloc(). Tested on: Mac OS X/32 10.6.2 (amazon) w/debug (too minor to require h5committest)
* [svn-r15510] Description:Quincey Koziol2008-08-211-8/+8
| | | | | | | | Clean up warnings & formatting Tested on: Mac OS X/32 10.5.4 (amazon) More tests forthcoming
* [svn-r13253] Updated all C and C++ style source code files with the THG ↵Albert Cheng2007-02-071-2/+3
| | | | | | | | | copyright notice. Tested platform: Kagiso only since it is only a comment block change. If it works in one machine, it should work in all, I hope. Still need to check the parallel build on copper.
* [svn-r13167] Description:Quincey Koziol2007-01-221-4/+2
| | | | | | | | | | | Get rid of two different types of fill value struct (merge H5O_fill_t and H5O_fill_new_t) and clean up & simplify dataset initialization code. (In preparation for shared object header message method call refactoring). Tested on: FreeBSD/32 6.2 (duty) Mac OS X/32 10.4.8 (amazon)
* [svn-r12662] Description:Quincey Koziol2006-09-121-11/+6
| | | | | | | | Whitespace/formatting/compiler warning cleanup. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
* [svn-r11245] Purpose:Quincey Koziol2005-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | Code cleanup Description: Trim trailing whitespace, which is making 'diff'ing the two branches difficult. Solution: Ran this script in each directory: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
* [svn-r9857] Purpose: MaintenanceElena Pourmal2005-01-221-3/+0
| | | | | | | | | | | | | | Description: Removed PABLO from the source Solution: Platforms tested: arabica with 64-bit, copper with parallel, heping with GNU C and C++ and PGI fortran (but I disabled hl, there is some weird problem only on heping: F9XMODFLAG is not propagated to the Makefile files Misc. update:
* [svn-r8731] Purpose:Quincey Koziol2004-06-231-5/+5
| | | | | | | | | | | | | | | Code cleanup & minor optimization Description: Re-work the way interface initialization routines are specified in the library to avoid the overhead of checking for them in routines where there is no interface initialization routine. This cleans up warnings with gcc 3.4, reduces the library binary size a bit (about 2-3%) and should speedup the library's execution slightly. Platforms tested: FreeBSD 4.10 (sleipnir) w/gcc34 h5committest
* [svn-r7929] Purpose:Quincey Koziol2003-12-111-4/+4
| | | | | | | | | | | Code cleanup Description: Fix H5MM_malloc() and H5MM_calloc() routines to use new FUNC_ENTER macros. Platforms tested: FreeBSD 4.9 (sleipnir) h5committest
* [svn-r7917] Purpose:Quincey Koziol2003-12-061-10/+10
| | | | | | | | | | | | | | | | | | | Code cleanup Description: Clean up compiler warnings, especially the 'FUNC' variable not used which comes out in production mode. Solution: Had to add a new FUNC_ENTER_NOAPI_NOINIT_NOFUNC macro for those non-API functions which don't need the 'FUNC' variable defined. (This will be _so_ much easier when C99 is standard on all our supposed platforms, since it has a __FUNC__ macro... ) Platforms tested: FreeBSD 4.9 (sleipnir) too minor for h5committest (although there were lots of files changed, the change was minor in each one)
* [svn-r7829] Purpose:Quincey Koziol2003-11-081-0/+67
| | | | | | | | | | | | | | | | | Bug fix & code cleanup Description: Allowing the library to call malloc with a size of 0 bytes causes problems for some users, so we check for allocations of 0 bytes and disallow them now. Cleaned up some code which could call malloc with 0 size. Changed some code calling HDmalloc directly to call H5MM_malloc(), which allows us to check for 0 sized allocations. Platforms tested: FreeBSD 4.9 (sleipnir) too minor to require h5committest
* [svn-r6546] Purpose:Bill Wendling2003-03-311-4/+14
| | | | | | | | | | | | Update Description: Updated copyright statement in files which hadn't been updated yet. Platforms tested: Linux (Only comment change) Misc. update:
* [svn-r6266] Purpose:Quincey Koziol2003-01-101-4/+4
| | | | | | | | | | | | Code cleanup/new feature. Description: Split FUNC_LEAVE into API and non-API specific versions. This allows a solution to compiling this branch with C++, as well as reducing the size of the binaries produced. Platforms tested: FreeBSD 4.7 (sleipnir) w/serial, parallel (including MPE) & thread-safe
* [svn-r5947] Purpose:Quincey Koziol2002-09-251-6/+8
| | | | | | | | | | | | | | | | Code cleanup Description: Clean up ID->name code: - Reformat to better match library coding standard - Changed several algorithms to be more efficient - Integrated into library more smoothly Platforms tested: eirene w/FORTRAN & C++ arabica w/FORTRAN modi4 w/FORTRAN & parallel sleipnir
* [svn-r5842] Purpose:Quincey Koziol2002-08-081-20/+27
| | | | | | | | | | | | | | | | Code cleanup Description: Change most (all?) HRETURN_ERROR macros to HGOTO_ERROR macros, along with HRETURN macros to HGOTO_DONE macros. This unifies the error return path from functions and reduces the size of the library by up to 10% on some platforms. Additionally, I improved a lot of the error cleanup code in many routines. Platforms tested: FreeBSD 4.6 (sleipnir) serial & parallel and IRIX64 6.5 (modi4) serial & parallel.
* [svn-r5471] Purpose:Quincey Koziol2002-05-291-1/+1
| | | | | | | | | | | | | | | | Code cleanup Description: Broke the FUNC_ENTER macro into several macros, with more specialized uses (which followup mail will describe). This was designed to move most/all of the checks which could be done at compile time to that point, instead of needlessly performing them (over & over :-) at run-time. This reduces the library's size (and thus staticly linked binaries) and has a minor speedup effect also. Platforms tested: IRIX64 6.5 (modi4) with parallel & FORTRAN enabled, and additional testing on FreeBSD and Solaris immediately after the checkin.
* [svn-r5467] Purpose:Quincey Koziol2002-05-281-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | Code cleanup. Description: Took Robb's recent ideas for improving the FUNC_ENTER/FUNC_LEAVE macros equivalents in the SAF library and adapted them to our library. I added an additional macro which is equivalent to FUNC_ENTER: FUNC_ENTER_NOINIT - Has the API tracing code, etc. from FUNC_ENTER but none of the library or interface initialization code. This is to be used _only_ for static functions and those which explicitly cannot have the library or interface initialization code enabled (like the API termination routines, etc.). This allowed many more of the functions in the library [but not all yet :-(] to be wrapped with FUNC_ENTER[_NOINIT]/FUNC_LEAVE pairs. It also reduced the size of the library and executables (by cutting out a bunch of code which was never executed), I'll e-mail the exact results when I've finished editing it. Platforms tested: IRIX64 6.5 (modi4)
* [svn-r4355] Purpose:Quincey Koziol2001-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | Code cleanup (sorta) Description: When the first versions of the HDF5 library were designed, I remembered vividly the difficulties of porting code from a 32-bit platform to a 16-bit platform and asked that people use intn & uintn instead of int & unsigned int, respectively. However, in hindsight, this was overkill and unnecessary since we weren't going to be porting the HDF5 library to 16-bit architectures. Currently, the extra uintn & intn typedefs are causing problems for users who'd like to include both the HDF5 and HDF4 header files in one source module (like Kent's h4toh5 library). Solution: Changed the uintn & intn's to unsigned and int's respectively. Platforms tested: FreeBSD 4.4 (hawkwind)
* [svn-r3781] Purpose:Bill Wendling2001-04-051-5/+5
| | | | | | | | | | | | | | | | | | Update Description: Changed #include <hdf_file.h> construct to #include "hdf_file.h" so that the GNU compiler can more easily pick up the dependencies which it places in the .depend and Dependencies files. Also regenerated the Dependencies to go along with this. Platforms tested: Linux
* [svn-r936] Changes since 19981119Robb Matzke1998-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------- ./src/H5.c ./src/H5A.c ./src/H5AC.c ./src/H5B.c ./src/H5D.c ./src/H5E.c ./src/H5F.c ./src/H5Farray.c ./src/H5Fcore.c ./src/H5Ffamily.c ./src/H5Fistore.c ./src/H5Flow.c ./src/H5Fmpio.c ./src/H5Fsec2.c ./src/H5Fsplit.c ./src/H5Fstdio.c ./src/H5G.c ./src/H5Gent.c ./src/H5Gnode.c ./src/H5Gstab.c ./src/H5HG.c ./src/H5HL.c ./src/H5I.c ./src/H5Iprivate.h ./src/H5MF.c ./src/H5MM.c ./src/H5O.c ./src/H5Oattr.c ./src/H5Ocomp.c ./src/H5Ocont.c ./src/H5Odtype.c ./src/H5Oefl.c ./src/H5Ofill.c ./src/H5Olayout.c ./src/H5Omtime.c ./src/H5Oname.c ./src/H5Osdspace.c ./src/H5Oshared.c ./src/H5Ostab.c ./src/H5P.c ./src/H5R.c ./src/H5RA.c ./src/H5S.c ./src/H5Sall.c ./src/H5Shyper.c ./src/H5Smpio.c ./src/H5Snone.c ./src/H5Spoint.c ./src/H5Sselect.c ./src/H5T.c ./src/H5TB.c ./src/H5Tbit.c ./src/H5Tconv.c ./src/H5V.c ./src/H5Z.c ./src/H5detect.c ./src/H5private.h Most of these changes are because the `interface_initialize_g' variable change from hbool_t to int. It's a one line change. Changed the way the library is closed so we have more control over the order the interfaces are shut down. Instead of registering an atexit() function for every interface in some haphazard order we just register one: H5_term_library() which then calls the H5*_term_interface() functions in a well-defined order. If the library is closed and then reopened repeatedly by calling H5close() and H5open() in a loop we only add one copy of the library termination functions with atexit(). Termination is a two-step process in order to help detect programming errors that would cause an infinite loop caused by the termination of one interface waking up some other previously terminated interface. The first step terminates the interface and *marks it as unusable*. After all interfaces are terminated then we mark them all as usable again. The FUNC_ENTER() macro has been modified to return failure or to dump core (depending on whether NDEBUG is defined) if we try to call an interface while it's shutting down. ./src/H5.c The H5dont_atexit() function returns failure if it's called more than once or if it's called too late. However, the error stack is not automatically printed on failure because the library might not be initialized yet ./test/chunk.c ./test/flush1.c ./test/flush2.c ./test/iopipe.c ./test/overhead.c ./test/ragged.c Changed the extra cast for Win32 so we do floating point division again -- it was just confusion about precedence and associativity of casting and the C coercion rules. Removed extra carriage returns inserted by broken operating system. ./src/H5Ffamily.c Fixed an bug where H5F_fam_write() lowered the EOF marker for one of the family members causing H5F_fam_read() to read zeros. ./test/h5test.h [NEW] ./test/h5test.c [NEW] ./test/Makefile.in ./test/bittests.c ./test/cmpd_dset.c ./test/dsets.c ./test/dtypes.c ./test/extend.c ./test/external.c Support library for test files. This isn't done yet but Katie's contractions are ~10 minutes apart so I figured I better back this stuff up just in case I'm not here next week... Eventually all test files will understand HDF5_DRIVER to name the low level file driver and parameters so we can easily test various drivers. They will also understand HDF5_PREFIX to prepend to the beginning of file names which is necessary for testing ROMIO with various drivers. Also, the cleanup function will know how to use the file name prefix and will understand different file driver naming schemes like file families. I'm not sure they'll understand the `gsf:' type prefixes yet. Note, the external test is completely commented out because I'm in the middle of modifying it. It will still compile and run but it doesn't test anything at the moment.