This topic has not yet been rated - Rate this topic

_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 );

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

_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.

Routine

Required header

_get_sbh_threshold

<malloc.h>

For more compatibility information, see Compatibility in the Introduction.

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.

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

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
This no longer works in VC 2010
Here is the forum post that explains this: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/803620b2-9b90-42b0-a9b1-36437c32ccb8