クリックして評価とフィードバックをお寄せください
MSDN
MSDN ライブラリ
Visual Studio 2005
Visual Studio ドキュメント
Visual C++
リファレンス
ライブラリ リファレンス
ランタイム ライブラリ
 _get_heap_handle

  低帯域幅での表示をオンにする
このページは次のバージョンについて記述しています。
Microsoft Visual Studio 2005/.NET Framework 2.0

その他のバージョンについては、以下の情報を参照してください。
ランタイム ライブラリ リファレンス
_get_heap_handle

C ランタイム システムが使用するヒープのハンドルを返します。

intptr_t _get_heap_handle( void );

C ランタイム システムが使用する Win32 ヒープを識別するハンドルを返します。

この関数を使用すると、HeapSetInformation を呼び出して CRT ヒープで Low Fragmentation Heap (LFH) を有効にできます。

ルーチン 必須ヘッダー 互換性

_get_heap_handle

<malloc.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition、Windows NT 4.0、Windows 2000、Windows XP Home Edition、Windows XP Professional、Windows Server 2003

互換性の詳細については、「C ランタイム ライブラリ」の「互換性」を参照してください。

// crt_get_heap_handle.cpp
// compile with: /MT
#include <windows.h>
#include <malloc.h>
#include <stdio.h>

int main(void)
{
    intptr_t hCrtHeap = _get_heap_handle();
    ULONG ulEnableLFH = 2;
    if (HeapSetInformation((PVOID)hCrtHeap,
                           HeapCompatibilityInformation,
                           &ulEnableLFH, sizeof(ulEnableLFH)))
        puts("Enabling Low Fragmentation Heap succeeded");
    else
        puts("Enabling Low Fragmentation Heap failed");
    return 0;
}

関連項目

メモリ割り当て

コミュニティ コンテンツ   コミュニティ コンテンツとは
新しいコンテンツの追加 RSS  注釈
Processing
© 2009 Microsoft Corporation. All rights reserved. 使用条件  |  商標  |  プライバシー
Page view tracker