다음을 통해 공유


_get_sbh_threshold

Returns the upper limit for the size of a memory allocation that is supported by the small-block heap.

size_t _get_sbh_threshold( void );

Return Value

Returns the upper limit for the size of a memory allocation that is supported by the small-block heap.

Remarks

_get_sbh_threshold gets the current threshold value for the small-block heap. The default threshold size is 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.

Requirements

Routine

Required header

_get_sbh_threshold

<malloc.h>

For more compatibility information, see Compatibility in the Introduction.

Example

This program shows how to retrieve the upper limit for the size of a memory allocation that is supported by the small-block heap.

// crt__get_sbh_threshold.c
#include <stdio.h>
#include <malloc.h>

int main( void )
{
    size_t  sbh_threshold;

    sbh_threshold = _get_sbh_threshold();

    printf( "The upper limit for the size of a memory allocation is %d.\n", sbh_threshold);
}
The upper limit for the size of a memory allocation is 0.

.NET Framework Equivalent

Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.

See Also

Reference

Memory Allocation

_set_sbh_threshold