mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-06 17:20:42 +08:00
[svn-r28815] Description:
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
This commit is contained in:
parent
48f7ad2df1
commit
4bf63f78e7
25
src/H5MM.c
25
src/H5MM.c
@ -185,6 +185,31 @@ H5MM__sanity_check(void *mem)
|
||||
H5MM__sanity_check_block(block);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5MM_sanity_check_all
|
||||
*
|
||||
* Purpose: Sanity check all current memory allocations.
|
||||
*
|
||||
* Return: N/A (void)
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* Jan 5 2016
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
H5MM_sanity_check_all(void)
|
||||
{
|
||||
H5MM_block_t *curr;
|
||||
|
||||
curr = H5MM_block_head_s.next;
|
||||
while(curr != &H5MM_block_head_s) {
|
||||
H5MM__sanity_check_block(curr);
|
||||
curr = curr->next;
|
||||
} /* end while */
|
||||
} /* end H5MM_sanity_check_all() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5MM_final_sanity_check
|
||||
|
@ -48,6 +48,7 @@ H5_DLL char *H5MM_xstrdup(const char *s);
|
||||
H5_DLL char *H5MM_strdup(const char *s);
|
||||
H5_DLL void *H5MM_xfree(void *mem);
|
||||
#if defined H5_MEMORY_ALLOC_SANITY_CHECK
|
||||
H5_DLL void H5MM_sanity_check_all(void);
|
||||
H5_DLL void H5MM_final_sanity_check(void);
|
||||
#endif /* H5_MEMORY_ALLOC_SANITY_CHECK */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user