Set the pool size for string return value allocations¶
saf_setProps_StrPoolSize
is a function defined in libprops.c.
Synopsis:
-
int
saf_setProps_StrPoolSize
(SAF_LibProps *properties, int size)¶
Formal Arguments:
properties
: The library property list which will be modified by this function (See *Properties*).size
: The new pool size.
Description: If the library string mode property is SAF__STRMODE_POOL
then string return values are allocated by the library
from a pool with some number of entries (4096 by default). When all entries of the pool have been allocated for
return values then the library begins freeing the least recently allocated entry.
Preconditions:
properties
must be a valid library properties handle. (low-cost)
Return Value: The constant SAF__SUCCESS
is returned when this function is successful. Otherwise this function either returns
an error number or throws an exception, depending on the value of the library’s error handling property.
Parallel Notes: This function can be called independently.
Known Bugs: This function sometimes returns an error instead of throwing an exception when the library error mode is
SAF__ERRMODE_THROW
.
The pool and its entries are not freed by saf_final.
See Also:
- saf_final: 4.2: Finalize access to the library
- Library Properties: Introduction for current chapter