modules/portlib/src/main/native/pool/shared/pool_cap.c File Reference


Detailed Description

Pool-capacity functions.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "hypool.h"

Functions

UDATA VMCALL pool_ensureCapacity (HyPool *aPool, UDATA newCapacity)
 Ensures that the pool is large enough for newCapacity elements.
UDATA VMCALL pool_capacity (HyPool *aPool)
 Returns the total capacity of a pool.


Function Documentation

UDATA VMCALL pool_capacity ( HyPool *  aPool  ) 

Returns the total capacity of a pool.

Parameters:
[in] aPool The pool
Returns:
0 on error

numElements in aPool otherwise

UDATA VMCALL pool_ensureCapacity ( HyPool *  aPool,
UDATA  newCapacity 
)

Ensures that the pool is large enough for newCapacity elements.

This has the side effect of setting the POOL_NEVER_FREE_PUDDLES flag. Without this, the pool could shrink back down to its original size. Note that this does not take into account the number of elements already used in the pool.

Parameters:
[in] aPool The pool
[in] newCapacity The desired new-size of the pool
Returns:
0 on success

-1 on failure


Genereated on Tue Dec 9 14:12:59 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.