共用方式為


_get_sbh_threshold

傳回記憶體配置支援的小區塊堆積的大小的上限。

size_t _get_sbh_threshold( void );

傳回值

傳回記憶體配置支援的小區塊堆積的大小的上限。

備註

_get_sbh_threshold取得目前的臨界值的小區塊堆積。預設臨界值的大小是零,代表Windows 2000和更新版平台中。預設情況下,小區塊堆積不使用在Windows 2000和更新版平台中,雖然_set_sbh_threshold可以使用非零的值,才能啟用小區塊堆積在這些案例中的呼叫。

需求

常式

所需的標頭

_get_sbh_threshold

<malloc.h>

如需相容性資訊,請參閱相容性在簡介中。

範例

此程式會示範如何擷取的支援小區塊堆積的記憶體配置的大小上限。

// 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);
}
  

.NET Framework 對等用法

不適用。 若要呼叫標準的 c 函式,使用PInvoke。 如需詳細資訊,請參閱平台叫用範例

請參閱

參考

記憶體配置

_set_sbh_threshold