.\" Automatically generated by Pandoc 2.2.1 .\" .TH "PMEMBLK_BSIZE" "3" "2019-02-19" "PMDK - pmemblk API version 1.1" "PMDK Programmer's Manual" .hy .\" Copyright 2014-2019, Intel Corporation .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" * Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" .\" * Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\" .\" * Neither the name of the copyright holder nor the names of its .\" contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT .\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .SH NAME .PP \f[B]pmemblk_bsize\f[](), \f[B]pmemblk_nblock\f[]() \- check number of available blocks or usable space in block memory pool .SH SYNOPSIS .IP .nf \f[C] #include\ size_t\ pmemblk_bsize(PMEMblkpool\ *pbp); size_t\ pmemblk_nblock(PMEMblkpool\ *pbp); \f[] .fi .SH DESCRIPTION .PP The \f[B]pmemblk_bsize\f[]() function returns the block size of the specified block memory pool, that is, the value which was passed as \f[I]bsize\f[] to \f[B]pmemblk_create\f[](). \f[I]pbp\f[] must be a block memory pool handle as returned by \f[B]pmemblk_open\f[](3) or \f[B]pmemblk_create\f[](3). .PP The \f[B]pmemblk_nblock\f[]() function returns the usable space in the block memory pool. \f[I]pbp\f[] must be a block memory pool handle as returned by \f[B]pmemblk_open\f[](3) or \f[B]pmemblk_create\f[](3). .SH RETURN VALUE .PP The \f[B]pmemblk_bsize\f[]() function returns the block size of the specified block memory pool. .PP The \f[B]pmemblk_nblock\f[]() function returns the usable space in the block memory pool, expressed as the number of blocks available. .SH SEE ALSO .PP \f[B]pmemblk_create\f[](3), \f[B]pmemblk_open\f[](3), \f[B]libpmemblk\f[](7) and \f[B]\f[]