#author("2020-01-02T14:59:15+00:00","default:haikikyou","haikikyou")
#author("2020-01-03T02:57:52+00:00","default:haikikyou","haikikyou")
[[PostgreSQL/解析]]

#contents

* Memory Context [#ed0f9858]

フラットなメモリ空間を構造化して管理するための機能であり、backendで用いられる。
-フラットなメモリ空間を構造化して管理するための機能であり、backendで用いられる。
-メモリコンテキストの初期化時、TopMemoryContextとErrorContextが作成される。この他、トップレベルのメモリコンテキストには、PostmasterContext、CacheMemoryContext、MessageContext、TopTransactionContext、CurTransactionContextがあり、TopMemoryContextは、全てのメモリコンテキストの親である。~
&label(warn){参考};
-[[src/backend/utils/mmgr/mcxt.c>https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/utils/mmgr/mcxt.c;h=b07be1223698a094f1b3a41ac59370d2b3d1cdb7;hb=refs/heads/REL_12_STABLE]] - &size(11){&color(gray){https://git.postgresql.org/gitweb/?p=postgresql.git;a=tree;h=refs/heads/REL_12_STABLE};};
- [[src/backend/utils/mmgr/README>https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/utils/mmgr/README;h=7e6541d0dee2783065b66cd6482478c298dec7a9;hb=refs/heads/REL_12_STABLE]] - &size(11){&color(gray){https://git.postgresql.org/gitweb/?p=postgresql.git;a=tree;h=refs/heads/REL_12_STABLE};};
* Memory Contextの操作 [#c06be0e1]

Memory Contextを使用することで、メモリ管理が容易になり、メモリリークのバグも減らせる。~
基本的なメモリコンテキストの操作は以下の図の通りである。

&ref(./memory-context-overview.png,100%);

* 参考リンク [#zbd54bd5]

- [[PostgreSQL Internals>https://www.postgresqlinternals.org/chapter5/]] - &size(11){&color(gray){on https://www.postgresqlinternals.org/chapter5/};};


トップ   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
目次
ダブルクリックで閉じるTOP | 閉じる
GO TO TOP