This documentation is archived and is not being maintained.


Sets the upper limit for the size of a memory allocation that will be supported by the small-block heap.

int _set_sbh_threshold(
   size_t size 


The new small-block threshold size to be set.

Return Value

Returns 1 if the operation of setting the small-block threshold size is successful. Returns 0 if the input threshold size is too big.


_set_sbh_threshold sets the current threshold value for the small-block heap. The default threshold size is 1016 bytes for Windows 95, 98, ME and Windows NT, and zero for Windows 2000 and later platforms. By default, the small-block heap is not used on Windows 2000 and later platforms, though _set_sbh_threshold can be called with a nonzero value to enable the small-block heap in those instances.


Routine Required header Compatibility
_set_sbh_threshold <malloc.h> Win 98, Win Me, Win NT, Win 2000, Win XP

For additional compatibility information, see Compatibility in the Introduction.


All versions of the C run-time libraries.

See Also

Memory Allocation Routines | _get_sbh_threshold | Run-Time Routines and .NET Framework Equivalents