Files
hdf5/src/H5HGquery.c
Larry Knox 89fbe00dec Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to 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.
2017-04-25 16:05:36 -05:00

144 lines
3.8 KiB
C
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Wednesday, July 20, 2011
*
* Purpose: Query routines for global heaps.
*
*/
/****************/
/* Module Setup */
/****************/
#include "H5HGmodule.h" /* This source code file is part of the H5HG module */
/***********/
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5HGpkg.h" /* Global heaps */
/****************/
/* Local Macros */
/****************/
/******************/
/* Local Typedefs */
/******************/
/********************/
/* Package Typedefs */
/********************/
/********************/
/* Local Prototypes */
/********************/
/*********************/
/* Package Variables */
/*********************/
/*****************************/
/* Library Private Variables */
/*****************************/
/*******************/
/* Local Variables */
/*******************/
/*-------------------------------------------------------------------------
* Function: H5HG_get_addr
*
* Purpose: Query the address of a global heap object.
*
* Return: Address of heap on success/abort on failure (shouldn't fail)
*
* Programmer: Quincey Koziol
* Wednesday, July 20, 2011
*
*-------------------------------------------------------------------------
*/
haddr_t
H5HG_get_addr(const H5HG_heap_t *heap)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(heap);
FUNC_LEAVE_NOAPI(heap->addr)
} /* H5HG_get_addr() */
/*-------------------------------------------------------------------------
* Function: H5HG_get_size
*
* Purpose: Query the size of a global heap object.
*
* Return: Size of heap on success/abort on failure (shouldn't fail)
*
* Programmer: Quincey Koziol
* Wednesday, July 20, 2011
*
*-------------------------------------------------------------------------
*/
size_t
H5HG_get_size(const H5HG_heap_t *heap)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(heap);
FUNC_LEAVE_NOAPI(heap->size)
} /* H5HG_get_size() */
/*-------------------------------------------------------------------------
* Function: H5HG_get_free_size
*
* Purpose: Query the free size of a global heap object.
*
* Return: Free size of heap on success/abort on failure (shouldn't fail)
*
* Programmer: Quincey Koziol
* Wednesday, July 20, 2011
*
*-------------------------------------------------------------------------
*/
size_t
H5HG_get_free_size(const H5HG_heap_t *heap)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(heap);
FUNC_LEAVE_NOAPI(heap->obj[0].size)
} /* H5HG_get_free_size() */