mpool_new()

allocate a new page for memory pool 

Function


SYNOPSIS

#include <db.h>

#include <mpool.h>

void *mpool_new(MPOOL *mp, pgno_t *pgnoaddr);


DESCRIPTION

The mpool_new() function allocates a new page for the specified pool and returns its address and its page number.


PARAMETERS

mp 

Is the memory pool for which a new page is to be allocated. This must be a pointer returned by a prior call to mpool_open().

pgnoaddr 

Is the location where the page number for the new page is returned.


RETURN VALUES

On success, mpool_new() return the address of the requested page, and stores the page number in pgnoaddr. Otherwise, it returns NULL, and sets errno to one of the conditions specified for read(), write(), or malloc().


CONFORMANCE

4.4BSD.


MULTITHREAD SAFETY LEVEL

Unsafe.


PORTING ISSUES

None


AVAILABILITY

MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
malloc(), mpool_close(), mpool_filter(), mpool_get(), mpool_open(), mpool_put(), mpool_sync(), read(), write()


MKS Toolkit 9.3 Documentation Build 6.