JP3795669B2 - Memory management device and storage medium storing memory management program - Google Patents

Memory management device and storage medium storing memory management program Download PDF

Info

Publication number
JP3795669B2
JP3795669B2 JP11794698A JP11794698A JP3795669B2 JP 3795669 B2 JP3795669 B2 JP 3795669B2 JP 11794698 A JP11794698 A JP 11794698A JP 11794698 A JP11794698 A JP 11794698A JP 3795669 B2 JP3795669 B2 JP 3795669B2
Authority
JP
Japan
Prior art keywords
memory
garbage collection
amount
expansion
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP11794698A
Other languages
Japanese (ja)
Other versions
JPH11312117A (en
Inventor
基行 河場
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP11794698A priority Critical patent/JP3795669B2/en
Publication of JPH11312117A publication Critical patent/JPH11312117A/en
Application granted granted Critical
Publication of JP3795669B2 publication Critical patent/JP3795669B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
JAVA等のプログラム言語は,メモリの拡張が必要となった時に不要なメモリ領域を自動的に求め解放するガベージコレクション機能を備えている。
【0002】
本発明は,ガベージコレクション(GC)を有する処理系(プログラム実行手段)のメモリ管理をするメモリ管理装置およびメモリ管理プログラムを記憶した記憶媒体に関するものである。
【0003】
【従来の技術】
従来のガベージコレクションを有するプログラムは,次のようにガベージコレクションを行い,メモリを拡張する。
【0004】
1.処理系(プログラム実行手段)がメモリを要求する。
2.要求されたメモリが確保できない場合、ガベージコレクションを要求する。
【0005】
3.ガベージコレクションが失敗した場合、OSにメモリ要求をする。
そして,メモリ領域を拡大する場合は、通常以下の方法のいづれかでメモリ領域を拡張する。
【0006】
1.固定量増加
総メモリサイズを固定量(例えば、1Mバイト)だけ、総メモリサイズを増やす。
【0007】
2.定数倍増加
総メモリサイズを固定倍(メモリ全体の0.3倍)した大きさだけ、総メモリサイズを増やす。
【0008】
3.空き領域を考慮した定数倍増加
総メモリサイズを固定倍(例えば0.3倍)した大きさから、メモリフラグメンテーション(メモリの不要領域を開放する処理)により得られた空き領域を差し引いた量のメモリ量を増やす。
【0009】
【発明が解決しようとする課題】
ガベージコレクションの実行は、処理系内部の変数の参照関係を全部探索し、必要のない変数を求め、その関係する領域を開放する等の処理を行なうので、非常に時間のかかる処理である。全実行時間の半分がガベージコレクション時間であることもまれではない。そのため、ガベージコレクションの実行回数を減らすことがメモリ管理において重要である。一般的に、処理系の実行初期段階で確保するメモリが多いほど、ガベージコレクションの実行回数を減らすことができる。しかし、メモリ量には限界があるので、メモリ量を必要以上に大きく確保することができない。
【0010】
本発明は、過去の実行メモリ使用履歴に基づき、あらかじめ必要なメモリ量を確保するようにし、効率的にメモリの拡張を行なうようにし、ガベージコレクションの実行回数を減らすことを目的とする。
【0011】
【課題を解決するための手段】
本発明は、ガベージコレクション実行手段と、ガベージコレクションを実行する毎にガベージコレクションの回数とガベージコレクションを実行した後のメモリ量を記録するガベージコレクション記録手段と、ガベージコレクション記録手段の記録に基づいて、ガベージコレクションの実行によりメモリ拡張を必要とする場合の拡張メモリ量を定めたメモリ拡張チャートを求める拡張メモリ量変換手段と、拡張メモリ量変換手段の求めた拡張メモリ量を保持する拡張メモリ量保持手段と、メモリ拡張を必要とする場合に、拡張メモリ量保持手段を参照し、該メモリ拡張チャートを参照して拡張メモリ量を決定するメモリ拡張手段とを備える構成をもつ。
【0012】
図1は、本発明の基本構成を示す。
図1において、
1はプログラム実行手段である。
【0013】
2はGC手段であって、ガベージコレクション実行手段である。
3はメモリである。
4はGC記録手段であって、ガベージコレクションとメモリ量の関係、例えばガベージコレクションを実行する毎の総メモリ量の記録を求め、保持するものである。
【0014】
5は拡張メモリ量変換手段であって、GC記録手段の総メモリ量の記録に基づいて、ガベージコレクションによりメモリ拡張するためのメモリ拡張チャートを作成するものである。
【0015】
6は拡張メモリ量保持手段であって、GC記録変換手段の求めたメモリ拡張チャートを保持するものである。
7はメモリ拡張手段であって、ガベージコレクションによりメモリ拡張を必要とする時にメモリ拡張チャートに従って、メモリを拡張するものである。
【0016】
図2は、本発明の基本構成の動作説明図である。
図2(a)は、変換前のメモリ拡張記録の例であり、ガベージコレクション回数と拡張後の総メモリ量の関係の記録を表すものである。
【0017】
横軸はガベージコレクションの回数であり、縦軸は拡張後の総メモリサイズ(総メモリ量)である。
初期状態からn1 、n2 、nk 、nm 、np はガベージコレクションでメモリが拡張を必要とした回数である。初期状態からn1 、nk からnm 、nn からnp の間は、ガベージコレクションでメモリの拡張がなかった期間である。
【0018】
図2(b)は、変換後のメモリ拡張チャートの例であり、図2(a)のガベージコレクション回数と拡張後の総メモリ量の関係の記録をもとに求めたメモリ拡張を必要とする時に拡張するメモリ量を予め定めたメモリ拡張チャートである。
【0019】
横軸はガベージコレクションでメモリ拡張をする回数であり、縦軸はメモリ拡張後の総メモリ量である。
1 は初期状態から始まって、メモリ拡張記録変換後に最初にメモリ拡張を必要とする時である。その点は図2(a)のn1 に対応し、拡張後の総メモリ量は図2(a)のnk の点の総メモリ拡張量に対応する。
【0020】
2 は初期状態から始まって、メモリ拡張記録変換後の2回目にメモリ拡張を必要とする時である。その点は図2(a)のnm に対応し、拡張後の総メモリ量は図2(a)のnp の点の総メモリ拡張量に対応する。
【0021】
3 は初期状態から始まって、メモリ拡張記録変換後の3回目にメモリ拡張を必要とする時である。その点はメモリ拡張量は図2(a)のnp に対応し、拡張後の総メモリ量は図2(a)のnp の点の総メモリ拡張量に対応する。
【0022】
1 、N2 、N3 にそれぞれ対応するn1 、nm 、np はあるメモリ拡張をした時点から一定回数内に総メモリ使用量の増加回数が一定数をこえている時刻を特定する。あるいは、ある一定回数内の総メモリ使用量の増加回数が一定数を越える期間が短い期間で隣接している場合、先に実行された期間の開始時刻の総メモリ使用量を後に実行された期間の終了時刻のメモリ使用量に変更する等で定める等、様々な方法で行なうことが可能である。
【0023】
図1の本発明の基本構成の動作を説明する。
プログラム実行手段1はプログラムを実行する。プログラム実行手段1がプログラムを実行している時に、ガベージコレクションを必要とすると、GC手段2はガベージコレクションを実行する。そして、GC手段2の処理の結果、総メモリの拡張を必要とすると、メモリ拡張手段7は所定量だけメモリを拡張する。
【0024】
GC記録手段4はガベージコレクションの記録を取る(例えば、図2(a)のガベージコレクション回数と拡張後の総メモリ量の関係の記録をとる)。
拡張メモリ量変換手段5は、ガベージコレクションの記録をもとにガベージコレクションによりメモリ拡張を必要とする時のメモリ拡張量を定めるメモリ拡張チャートを求める(図2(b)の横軸と縦軸の関係を求める)。メモリ拡張チャートは変換後拡張メモリ量保持手段6に保持される。
【0025】
この後、拡張メモリ量変換手段5は、変換前のメモリ拡張の記録(図2(a))をもとに変換後のメモリ拡張チャート(図2(b))を生成する。
そして、次にプログラム実行手段1がプログラムを実行する時においてGC手段2がガベージコレクションを実行し、メモリ拡張を必要とする場合、メモリ拡張手段7はメモリ拡張チャートに従ってメモリを拡張する。
【0026】
次に、メモリ拡張チャートの生成方法について説明する。但し、以下の方法は1例でありこの方法に限定されるものではない。
例えば、初回にメモリ拡張を必要とする時点(N1 )において、総メモリ量の変化率を参照する等により、変換前のnk の時点での拡張後総メモリ量になるようにメモリ量を拡張する(メモリ拡張をした一定回数後の総メモリ量で求める等、他の方法でも良い)。
【0027】
同様に、次にメモリ拡張を必要とする時点(N2 )で、変換前の時点nm での拡張後総メモリ量になるようにメモリ量を拡張する。
同様に、次にメモリ拡張を必要とする時点(N3 )で、変換前の時点np での拡張後総メモリ量になるようにメモリ量を拡張する。
【0028】
本発明によれば、メモリ拡張を効率的に行なうことができ、ガベージコレクションの回数を大幅に減らすことができる。
【0029】
【発明の実施の形態】
図3は本発明の実施の形態の動作の概略を示す。
S1 初回の実行において、メモリ拡張時のメモリ使用量の記録を取る。
【0030】
S2 メモリ拡張時のメモリ使用量の記録を変更(変換)する。
S3 変更後のメモリ使用量の記録をもとにメモリ拡張量を決定する。
あらかじめ決めた回数の実行の後の再実行は、初回実行をもとに変更したメモリ拡張チャートをもとに実行するか、あるいは、S3での実行結果を反映させ、改めてS2でメモリ拡張時のメモリ使用量を変更して、新たにメモリ拡張チャートを生成し、そのチャートをもとに実行しても良い。
【0031】
図4は本発明のメモリ使用量の記録フォーマットの例である。
ガベージコレクションの起動回数GC回数(メモリ拡張をしなかった場合とメモリ拡張をした場合の双方を含む)と、拡張後のメモリサイズを対応付けて記録したものである(拡張しなかった場合を含む)。
【0032】
図5は本発明のメモリサイズの記録のフローチャートである。
S1 n(メモリ拡張回数)、gc count(ガベージコレクション回数)、GC回数(メモリ拡張をした時点でのガベージコレクション回数)を初期値0にする。
【0033】
S2 プログラムが終了したか判定する。終了していればS9で処理を終了する。終了していなければ、S3の処理をする。
S3 メモリ要求命令か判定する。メモリ要求命令であればS4で要求されたメモリを確保できるか判定する。メモリ要求命令でなければS8で要求された命令を実行する。
【0034】
S4 要求されたメモリを確保できるか判定する。要求されたメモリを確保できれば命令を実行する。要求されたメモリを確保できなければ、S5でガベージコレクションを起動する。
【0035】
S5 GC起動を行ない、gc countを1インクリメントする。
S6 メモリ拡張が必要か判定する。メモリ拡張を必要としなければメモリ拡張をしないでS8で命令を実行する。メモリ拡張が必要であれば、S7でメモリ拡張をする。
【0036】
S7 nをn+1とし、gc countをGC回数にし、現在のメモリサイズを拡張後メモリサイズにする。
S8 命令を実行する。
【0037】
図6は本発明のメモリ拡張記録の変換方法の実施の形態1を示す。
図6(a)は、本発明のメモリ拡張記録の例であり、図6(b)、図6(c)は変換後のメモリ拡張チャートである。
【0038】
メモリ拡張をしたガベージコレクションのnの時点からのgc count数であるkを定める。そして、メモリ拡張をしたnの時点のGC回数をGC回数〔n〕としたとき、GC回数〔n〕+kがGC回数〔n+1〕を超えていればnに対応する変換後のNの時点の総メモリ量を変換前のn+1の時点の総メモリ量とする(図6(b)参照)。そして、GC回数+kがGC回数〔n+1〕を超えていなければGC回数〔n+1〕に対応する変換後の時点をN+1として、その時点のメモリ量を変換前のn+1の時点の総メモリ量とする(変更しない(図6(c)参照))。
【0039】
図7は本発明のメモリ拡張記録の変換方法の実施の形態2を示す図である。
図7のメモリ拡張量の変換方法は、ある一定ガベージコレクションの起動回数内において総メモリ使用量を増加させる場合が頻繁に出現した場合、先に実行された期間の開始時刻の総メモリ使用量を、後に実行された期間の終了時点のメモリ使用量に変更する方法である。
【0040】
図7(a)は変換前のメモリ拡張回数とメモリ拡張量の関係を示す図である。
図7(b)はメモリ拡張回数の記録を変換した後のメモリ拡張チャートを示す図である。
【0041】
図7(a)は、ある一定ガベージコレクションの起動回数内において総メモリ使用量を増加させる場合が頻繁に出現した場合を示す。このような場合は、先に実行された期間の開始時刻の総メモリ使用量を、後に実行された期間の終了時点のメモリ使用量に変更する。
【0042】
即ち、変換後のN(変換前のnに対応する)のメモリ拡張量を変換前のn+1に使用したメモリ量にする。さらに、n+2のメモリ拡張量をNの拡張量にする。さらに、n+3のメモリ拡張量をNの拡張量にする。
【0043】
このようにして、図7(b)に示すようなメモリ拡張チャートを作成する。
図8は、本発明のメモリサイズ変換方法のフローチャートである。
S1 変換前のメモリ拡張回数n、変換後のメモリ拡張回数Nを0に初期化し、メモリ使用量の記録のサイズをMAXとする。
【0044】
S2 nがMAXより小さいか判定する。小さければ、S3の処理を行ない、MAXより大きいか等しいければ処理を終了する。
S3 GC回数〔n〕+kがGC回数〔n+1〕を超えているか判定し、超えていればS4の処理を行ない、超えていなければ、S5の処理を行なう。
【0045】
S4 変換前の拡張後のメモリサイズ〔n+1〕を変換後の拡張メモリサイズ〔N〕にする。
S5 変換前の拡張後のメモリサイズ〔n+1〕を変換後の拡張メモリサイズ〔N+1〕にする。GC回数〔n+1〕を変換後のGC回数〔N+1〕にする。
【0046】
S6 Nを1インクリメントする。
S7 nを1インクリメントとし、S2以降の処理を繰り返す。
図9は、本発明の実施の形態1のフローチャートである。
【0047】
本実施例によれば、初回の実行のメモリ拡張の記録を求め、次回の実行においてメモリ拡張チャートを求め、そのメモリ拡張チャートに従ってメモリを拡張する。
【0048】
S1 nを0にし、メモリ記録のサイズをMAX、拡張後メモリサイズ〔0〕を初期メモリサイズとする。
S2 プログラムは終了したか判定する。終了していなければ、S3の処理を行なう。終了していれば、S12で処理を終了する。
【0049】
S3 メモリ要求命令か判定する。メモリ要求命令であれば、S4の処理を行ない、メモリ要求命令でなければ、S11で命令を実行する。
S4 要求されたメモリを確保できるか判定し、確保できれば、S11で命令を実行する。要求されたメモリを確保できなければ、S5の処理を行なう。
【0050】
S5 ガベージコレクションを起動する。gc countを1インクリメントする。
S6 メモリ拡張が必要か判定する。必要であれば、S7の処理を行ない、必要でなければ、S11で命令を実行する。
【0051】
S7 nを1インクリメントする。
S8 nがMAXより小さいか判定する。小さければS9の処理を行ない、小さくなければS10の処理を行なう。
【0052】
S9 メモリ拡張チャートに従ってメモリサイズを拡張する(拡張後メモリサイズ〔n〕をメモリサイズにする)。
S10 従来の手法でメモリ拡張を行なう。
【0053】
S11 命令を実行し、S2以降の処理を繰り返す。
図10は本発明の実施の形態2のフローチャートである。
本発明の実施の形態2は、nがMAXより大きくなった後、従来手法でメモリ拡張を行ない、その拡張後のメモリサイズを現在のメモリサイズとして、そのメモリ拡張チャートの記録をもとに変換後のメモリ拡張チャートを更新する。
【0054】
S1 nを0にし、メモリ記録のサイズをMAX、拡張後メモリサイズ〔0〕を初期メモリサイズとする。
S2 プログラムは終了したか判定する。終了していなければ、S3の処理を行なう。終了していれば、S13で処理を行なう。
【0055】
S3 メモリ要求命令か判定する。メモリ要求命令であれば、S4の処理を行ない、メモリ要求命令でなければ、S12で命令を実行する。
S4 要求されたメモリを確保できるか判定し、確保できれば、S12で命令を実行する。要求されたメモリを確保できなければ、S5の処理を行なう。
【0056】
S5 ガベージコレクションを起動する。gc countを1インクリメントする。
S6 メモリ拡張が必要か判定する。必要であれば、S7の処理を行ない、必要でなければ、S12で命令を実行する。
【0057】
S7 nを1インクリメントする。
S8 nがMAXより小さいか判定する。小さければS9の処理を行ない、小さくなければS10の処理を行なう。
【0058】
S9 メモリ拡張チャートに従ってメモリサイズを拡張する(拡張後メモリサイズ〔n〕をメモリサイズにする)。
S10 従来の手法でメモリ拡張を行なう。
【0059】
S11 現在のメモリサイズを拡張後メモリサイズ〔n〕にする。
S12 命令を実行し、S2以降の処理を繰り返す。
S13 nがMAXより小さいか判定する。小さくなければS14の処理を行ない、小さければS15で処理を終了する。
【0060】
S14 メモリ使用量の記録を変換する。
本発明によれば、メモリ拡張を早めに行なうことにより、ガベージコレクションの起動回数を減らすことができる。特に、次のような場合に有効である。
【0061】
プログラムには、多くの新しいメモリを必要とする実行フェーズがある。例えば、プログラムの実行初期段階、プログラムのフェーズ移行前等である。このような場合、ガベージコレクションが多発し、ほとんどの場合メモリ拡張をともなう。このような時、ガベージコレクションによるメモリ回収率(空きサイズ/新メモリサイズ)は非常に低い。
【0062】
このような実行フェースでは、先にメモリを拡張することにより、ガベージコレクションの回数を大きく削減できる。本発明では特に、実行毎の挙動が酷似している入力に対して有効である。また、実行毎の挙動が異なる場合でも、実行初期段階でのメモリ使用量の増加の振る舞いは酷似しているので、本発明が有効である。
【0063】
上記の実施の形態の他、実行の初期時に拡張する方法もある。装置に搭載しているメモリ量にある程度余裕がある場合には、あらかじめ必要なメモリを確保しておくことでガベージコレクションの回数を削減できる。この場合には前述の方法で、k=∞とすれば、初期メモリサイズが前回の最終的なメモリサイズに等しくなる。このようにして初期メモリサイズとすることにより、ガベージコレクション回数を減らすことができる。
【0064】
【発明の効果】
本発明によれば、メモリ拡張を効率的に行なうことができ、ガベージコレクションにおいてメモリ拡張を必要とする回数を大幅に減らすことができる。そのため、ガベージコレクションを必要とする処理系の動作を高速化することができる。
【0065】
以上の説明に関して更に以下の項を開示する。
(1)ガベージコレクション実行手段と、ガベージコレクションを実行する毎にガベージコレクションの回数とガベージコレクションを実行した後のメモリ使用量を記録するガベージコレクション記録手段と、ガベージコレクション記録手段の記録に基づいて、ガベージコレクションの実行によりメモリ拡張を必要とする場合の拡張メモリ量を定めたメモリ拡張チャートを求める拡張メモリ量変換手段と、拡張メモリ量変換手段の求めた拡張メモリ量を保持する拡張メモリ量保持手段と、メモリ拡張を必要とする場合に、拡張メモリ量保持手段を参照し、該メモリ拡張チャートを参照し、拡張メモリ量を決定するメモリ拡張手段とを備えるメモリ管理装置において、拡張メモリ量変換手段は、ある一定のガベージコレクションの起動回数から総メモリ使用量の増加回数が一定数を超えている時点を求め、その時刻の総メモリ使用量を一定回数後の総メモリ使用量とする。
【0066】
(2)ガベージコレクション実行手段と、ガベージコレクションを実行する毎にガベージコレクションの回数とガベージコレクションを実行した後のメモリ使用量を記録するガベージコレクション記録手段と、ガベージコレクション記録手段の記録に基づいて、ガベージコレクションの実行によりメモリ拡張を必要とする場合の拡張メモリ量を定めたメモリ拡張チャートを求める拡張メモリ量変換手段と、拡張メモリ量変換手段の求めた拡張メモリ量を保持する拡張メモリ量保持手段と、メモリ拡張を必要とする場合に、拡張メモリ量保持手段を参照し、該メモリ拡張チャートを参照し、拡張メモリ量を決定するメモリ拡張手段とを備えるメモリ管理装置において、拡張メモリ量変換手段は、ある一定のガベージコレクションの起動回数内において総メモリ使用量を増加させる場合が頻繁に出現した場合、先に実行された期間の開始時刻の総メモリ使用量を、後に実行された期間の終了時点のメモリ使用量に変更する。
【0067】
(3) 上記(1)もしくは(2)のメモリ管理装置であって、予め求められた変換後のメモリ量のガベージコレクションの回数Nより多い回数が実行された時、Nを超えて実行されたガベージコレクションの記録を追加して記録する。
【0068】
(4)ガベージコレクション実行手段と、ガベージコレクションを実行する毎にガベージコレクションの回数とガベージコレクションを実行した後のメモリ使用量を記録するガベージコレクション記録手段と、ガベージコレクション記録手段の記録に基づいて、ガベージコレクションの実行によりメモリ拡張を必要とする場合の拡張メモリ量を定めたメモリ拡張チャートを求める拡張メモリ量変換手段と、拡張メモリ量変換手段の求めた拡張メモリ量を保持する拡張メモリ量保持手段と、メモリ拡張を必要とする場合に、拡張メモリ量保持手段を参照し、該メモリ拡張チャートを参照し、拡張メモリ量を決定するメモリ拡張手段とを備えるメモリ管理装置において、拡張メモリ量変換手段は、前回以前のプログラムの実行終了時の総メモリ量の記録に従って総メモリ量を求め、実行の初期の時点で該総メモリ量を確保する。
【図面の簡単な説明】
【図1】本発明の基本構成を示す図である。
【図2】本発明の基本構成の動作説明図である。
【図3】本発明の実施の形態の動作概略説明図である。
【図4】本発明のメモリ使用量の記録フォーマットの例を示す図である。
【図5】本発明のメモリサイズの記録のフローチャートを示す図である。
【図6】本発明のメモリ拡張記録の変換方法の実施の形態1を示す図である。
【図7】本発明のメモリ拡張記録の変換方法の実施の形態2を示す図である。
【図8】本発明のメモリサイズの記録の変換方法のフローチャートを示す図である。
【図9】本発明の実施の形態1のフローチャートを示す図である。
【図10】本発明の実施の形態2のフローチャートを示す図である。
【符号の説明】
1:プログラム実行手段
2:GC手段
3:メモリ
4:GC記録手段
5:拡張メモリ量変換手段
6:拡張メモリ量保持手段
7:メモリ拡張手段
[0001]
BACKGROUND OF THE INVENTION
A programming language such as JAVA has a garbage collection function that automatically finds and releases an unnecessary memory area when memory expansion is required.
[0002]
The present invention relates to a memory management device for managing memory of a processing system (program execution means) having garbage collection (GC) and a storage medium storing a memory management program.
[0003]
[Prior art]
A program having a conventional garbage collection performs garbage collection as follows to expand the memory.
[0004]
1. A processing system (program execution means) requests a memory.
2. Request garbage collection if the requested memory cannot be allocated.
[0005]
3. When garbage collection fails, a memory request is made to the OS.
When expanding the memory area, the memory area is usually expanded by one of the following methods.
[0006]
1. The total memory size is increased by a fixed amount (for example, 1 Mbyte).
[0007]
2. Constant memory increase The total memory size is increased by a fixed size (0.3 times the total memory) of the total memory size.
[0008]
3. The amount of memory obtained by subtracting the free space obtained by memory fragmentation (processing to release unnecessary memory space) from the fixed multiple (for example, 0.3 times) of the total memory size that is increased by a constant multiple considering the free space Increase the amount.
[0009]
[Problems to be solved by the invention]
The execution of garbage collection is a very time-consuming process because it searches all reference relationships among variables in the processing system, finds unnecessary variables, and performs processing such as releasing the related area. It is not uncommon for half of the total execution time to be garbage collection time. For this reason, it is important in memory management to reduce the number of times garbage collection is executed. Generally, the more memory secured in the initial stage of execution of the processing system, the more the number of garbage collection executions can be reduced. However, since there is a limit to the amount of memory, the amount of memory cannot be secured larger than necessary.
[0010]
An object of the present invention is to secure a necessary memory amount in advance based on a past execution memory use history, to efficiently expand a memory, and to reduce the number of times of garbage collection.
[0011]
[Means for Solving the Problems]
The present invention is based on the garbage collection execution means, the garbage collection recording means for recording the number of times of garbage collection and the amount of memory after executing the garbage collection every time garbage collection is executed, and the recording of the garbage collection recording means. Extended memory amount conversion means for obtaining a memory expansion chart that defines an extended memory amount when memory expansion is required by executing garbage collection, and extended memory amount holding means for holding the extended memory amount obtained by the extended memory amount conversion means And a memory expansion unit that refers to the expanded memory amount holding unit and determines the expanded memory amount with reference to the memory expansion chart when memory expansion is required.
[0012]
FIG. 1 shows the basic configuration of the present invention.
In FIG.
Reference numeral 1 denotes program execution means.
[0013]
Reference numeral 2 denotes GC means, which is a garbage collection execution means.
Reference numeral 3 denotes a memory.
Reference numeral 4 denotes GC recording means for obtaining and holding the relationship between garbage collection and the amount of memory, for example, recording of the total amount of memory every time garbage collection is executed.
[0014]
Reference numeral 5 denotes expanded memory amount conversion means for creating a memory expansion chart for expanding the memory by garbage collection based on the recording of the total memory amount of the GC recording means.
[0015]
Reference numeral 6 denotes an extended memory amount holding means for holding the memory expansion chart obtained by the GC recording conversion means.
Reference numeral 7 denotes memory expansion means for expanding the memory according to the memory expansion chart when the memory expansion is required by garbage collection.
[0016]
FIG. 2 is an operation explanatory diagram of the basic configuration of the present invention.
FIG. 2A shows an example of memory expansion recording before conversion, and shows a record of the relationship between the number of garbage collections and the total memory amount after expansion.
[0017]
The horizontal axis is the number of garbage collections, and the vertical axis is the total memory size (total memory amount) after expansion.
From the initial state, n 1 , n 2 , n k , n m , and n p are the number of times that the memory needs to be expanded by garbage collection. The period from the initial state to n 1 , n k to n m , and n n to n p is a period in which no memory is expanded by garbage collection.
[0018]
FIG. 2B is an example of the memory expansion chart after conversion, and requires memory expansion obtained based on the record of the relationship between the number of garbage collections and the total memory amount after expansion in FIG. It is a memory expansion chart in which the amount of memory that is sometimes expanded is predetermined.
[0019]
The horizontal axis represents the number of times of memory expansion by garbage collection, and the vertical axis represents the total memory amount after memory expansion.
N 1 starts from the initial state and is the time when memory expansion is first required after memory expansion recording conversion. This point corresponds to n 1 in FIG. 2A, and the total memory amount after expansion corresponds to the total memory expansion amount at point n k in FIG. 2A.
[0020]
N 2 is the time when the memory expansion is required for the second time after the memory expansion recording conversion, starting from the initial state. This point corresponds to n m in FIG. 2A, and the total memory amount after expansion corresponds to the total memory expansion amount at point n p in FIG. 2A.
[0021]
N 3 is the time when the memory expansion is required for the third time after the memory expansion recording conversion, starting from the initial state. In this regard, the memory expansion amount corresponds to n p in FIG. 2A, and the total memory amount after expansion corresponds to the total memory expansion amount at point n p in FIG.
[0022]
N 1, N 2, n 1 respectively corresponding to the N 3, n m, n p is increased number of a memory expansion to the total memory usage within a certain number of times from the time to identify the time that exceeds the predetermined number . Or, if the period in which the increase in the total memory usage within a certain number of times exceeds a certain number is adjacent in a short period, the total memory usage at the start time of the previously executed period is the period that was executed later This can be done in various ways, for example, by changing the memory usage amount at the end time.
[0023]
The operation of the basic configuration of the present invention shown in FIG. 1 will be described.
The program execution means 1 executes a program. If garbage collection is required when the program execution means 1 is executing a program, the GC means 2 executes garbage collection. If the expansion of the total memory is required as a result of the processing of the GC unit 2, the memory expansion unit 7 expands the memory by a predetermined amount.
[0024]
The GC recording unit 4 records garbage collection (for example, records the relationship between the number of garbage collections and the total memory amount after expansion in FIG. 2A).
The expanded memory amount conversion means 5 obtains a memory expansion chart for determining the memory expansion amount when the memory expansion is required by garbage collection based on the garbage collection record (the horizontal axis and the vertical axis in FIG. 2B). Seek relationship). The memory expansion chart is held in the extended memory amount holding means 6 after conversion.
[0025]
Thereafter, the expanded memory amount conversion means 5 generates a memory expansion chart after conversion (FIG. 2B) based on the memory expansion record before conversion (FIG. 2A).
Then, when the program execution means 1 next executes the program, if the GC means 2 executes garbage collection and requires memory expansion, the memory expansion means 7 expands the memory according to the memory expansion chart.
[0026]
Next, a method for generating a memory expansion chart will be described. However, the following method is an example and is not limited to this method.
For example, when the memory expansion is required for the first time (N 1 ), by referring to the rate of change of the total memory amount, the memory amount is set so as to be the total memory amount after expansion at the time point n k before conversion. Expansion (other methods such as obtaining the total memory amount after a certain number of memory expansions may be used).
[0027]
Similarly, at the time point (N 2 ) when memory expansion is required next, the memory amount is expanded so that the total memory amount after expansion at the time point n m before conversion is reached.
Similarly, at the time point (N 3 ) when memory expansion is required next, the memory amount is expanded so as to be the total memory amount after expansion at the time point n p before conversion.
[0028]
According to the present invention, memory expansion can be performed efficiently, and the number of garbage collections can be greatly reduced.
[0029]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 3 shows an outline of the operation of the embodiment of the present invention.
S1 In the first execution, the memory usage at the time of memory expansion is recorded.
[0030]
S2 Changes (converts) recording of memory usage during memory expansion.
S3: Determine the memory expansion amount based on the record of the memory usage after the change.
The re-execution after the predetermined number of executions is executed based on the memory expansion chart changed based on the initial execution, or the execution result in S3 is reflected, and the memory expansion chart is updated in S2 again. The memory usage amount may be changed, a new memory expansion chart may be generated, and executed based on the chart.
[0031]
FIG. 4 shows an example of a recording format of memory usage according to the present invention.
Garbage collection activation count GC count (including both when memory expansion is not performed and when memory expansion is performed) and memory size after expansion are recorded in association with each other (including the case where expansion is not performed) ).
[0032]
FIG. 5 is a flowchart for recording the memory size of the present invention.
S1 n (memory expansion count), gc The count (the number of garbage collection) and the GC number (the number of garbage collection when the memory is expanded) are set to the initial value 0.
[0033]
S2 Determine whether the program is finished. If completed, the process ends in S9. If not completed, the process of S3 is performed.
S3 Judge whether it is a memory request instruction. If it is a memory request instruction, it is determined whether the memory requested in S4 can be secured. If it is not a memory request instruction, the instruction requested in S8 is executed.
[0034]
S4: Determine whether the requested memory can be secured. If the requested memory can be secured, the instruction is executed. If the requested memory cannot be secured, garbage collection is started in S5.
[0035]
S5 Start GC, gc Increment count by one.
S6: Determine whether memory expansion is necessary. If memory expansion is not required, the instruction is executed in S8 without memory expansion. If memory expansion is necessary, memory expansion is performed in S7.
[0036]
S7 n is n + 1, gc The count is set to the GC count, and the current memory size is set to the expanded memory size.
S8 Instruction is executed.
[0037]
FIG. 6 shows Embodiment 1 of the conversion method for memory expansion recording of the present invention.
6A is an example of memory expansion recording according to the present invention, and FIGS. 6B and 6C are memory expansion charts after conversion.
[0038]
Gc from time n of garbage collection with expanded memory The number k is determined. Then, when the GC number [n] at the time point n after the memory expansion is defined as the GC number [n], if the GC number [n] + k exceeds the GC number [n + 1], the N time point after conversion corresponding to n The total memory amount is defined as the total memory amount at time n + 1 before conversion (see FIG. 6B). If the GC count + k does not exceed the GC count [n + 1], the time point after conversion corresponding to the GC count [n + 1] is N + 1, and the memory amount at that time is the total memory amount at the time point n + 1 before the conversion. (Do not change (see FIG. 6C)).
[0039]
FIG. 7 is a diagram showing a second embodiment of the conversion method for memory expansion recording according to the present invention.
In the memory expansion amount conversion method of FIG. 7, when the total memory usage frequently increases within a certain number of garbage collection activation times, the total memory usage at the start time of the previously executed period is calculated. This is a method of changing to the memory usage at the end of the period executed later.
[0040]
FIG. 7A shows the relationship between the number of memory expansions before conversion and the memory expansion amount.
FIG. 7B is a diagram showing a memory expansion chart after the recording of the memory expansion count is converted.
[0041]
FIG. 7A shows a case where the total memory usage increases frequently within a certain number of garbage collection activations. In such a case, the total memory usage at the start time of the previously executed period is changed to the memory usage at the end of the later executed period.
[0042]
That is, the memory expansion amount of N after conversion (corresponding to n before conversion) is made the memory amount used for n + 1 before conversion. Further, the memory expansion amount of n + 2 is set to N expansion amount. Further, the memory expansion amount of n + 3 is set to the N expansion amount.
[0043]
In this way, a memory expansion chart as shown in FIG.
FIG. 8 is a flowchart of the memory size conversion method of the present invention.
S1: The memory expansion count n before conversion and the memory expansion count N after conversion are initialized to 0, and the recording size of the memory usage is set to MAX.
[0044]
It is determined whether S2n is smaller than MAX. If it is smaller, the process of S3 is performed, and if it is greater than or equal to MAX, the process is terminated.
S3 It is determined whether the GC number [n] + k exceeds the GC number [n + 1]. If it exceeds, the process of S4 is performed, and if not, the process of S5 is performed.
[0045]
S4: The expanded memory size [n + 1] before conversion is changed to the expanded memory size [N] after conversion.
S5: The expanded memory size [n + 1] before conversion is changed to the expanded memory size [N + 1] after conversion. The GC number [n + 1] is set to the converted GC number [N + 1].
[0046]
S6 N is incremented by one.
S7 n is incremented by 1, and the processes after S2 are repeated.
FIG. 9 is a flowchart of the first embodiment of the present invention.
[0047]
According to this embodiment, the memory expansion record of the first execution is obtained, the memory expansion chart is obtained in the next execution, and the memory is expanded according to the memory expansion chart.
[0048]
S1 n is set to 0, the memory recording size is MAX, and the expanded memory size [0] is the initial memory size.
S2 It is determined whether the program is finished. If not completed, the process of S3 is performed. If completed, the process ends at S12.
[0049]
S3 Judge whether it is a memory request instruction. If it is a memory request instruction, the process of S4 is performed, and if it is not a memory request instruction, the instruction is executed in S11.
S4: Determine whether the requested memory can be secured, and if so, execute the instruction in S11. If the requested memory cannot be secured, the process of S5 is performed.
[0050]
S5 Starts garbage collection. gc Increment count by one.
S6: Determine whether memory expansion is necessary. If necessary, the process of S7 is performed. If not, the instruction is executed in S11.
[0051]
S7 n is incremented by one.
It is determined whether S8 n is smaller than MAX. If it is smaller, the process of S9 is performed, and if it is not smaller, the process of S10 is performed.
[0052]
S9: The memory size is expanded according to the memory expansion chart (the expanded memory size [n] is changed to the memory size).
S10 The memory is expanded by the conventional method.
[0053]
The S11 instruction is executed, and the processes after S2 are repeated.
FIG. 10 is a flowchart of the second embodiment of the present invention.
In the second embodiment of the present invention, after n becomes larger than MAX, memory expansion is performed by a conventional method, and the memory size after the expansion is set as the current memory size and converted based on the record of the memory expansion chart. Update the later memory expansion chart.
[0054]
S1 n is set to 0, the memory recording size is MAX, and the expanded memory size [0] is the initial memory size.
S2 It is determined whether the program is finished. If not completed, the process of S3 is performed. If completed, the process is performed in S13.
[0055]
S3 Judge whether it is a memory request instruction. If it is a memory request instruction, the process of S4 is performed, and if it is not a memory request instruction, the instruction is executed in S12.
S4: Determine whether the requested memory can be secured, and if so, execute the instruction in S12. If the requested memory cannot be secured, the process of S5 is performed.
[0056]
S5 Starts garbage collection. gc Increment count by one.
S6: Determine whether memory expansion is necessary. If necessary, the process of S7 is performed, and if not necessary, the instruction is executed in S12.
[0057]
S7 n is incremented by one.
It is determined whether S8 n is smaller than MAX. If it is smaller, the process of S9 is performed, and if it is not smaller, the process of S10 is performed.
[0058]
S9: The memory size is expanded according to the memory expansion chart (the expanded memory size [n] is changed to the memory size).
S10 The memory is expanded by the conventional method.
[0059]
S11: The current memory size is set to the expanded memory size [n].
S12 The instruction is executed, and the processes after S2 are repeated.
S13 Determine whether n is smaller than MAX. If it is not smaller, the process of S14 is performed. If it is smaller, the process is terminated in S15.
[0060]
S14: The memory usage record is converted.
According to the present invention, the number of times of starting garbage collection can be reduced by performing memory expansion earlier. This is particularly effective in the following cases.
[0061]
The program has an execution phase that requires a lot of new memory. For example, the initial stage of program execution, before phase transition of the program, and the like. In such cases, garbage collection occurs frequently, and in most cases is accompanied by memory expansion. In such a case, the memory recovery rate (free size / new memory size) by garbage collection is very low.
[0062]
In such an execution face, the number of garbage collection can be greatly reduced by expanding the memory first. In particular, the present invention is effective for an input whose behavior for each execution is very similar. Further, even if the behavior differs from execution to execution, the behavior of the increase in memory usage at the initial stage of execution is very similar, so that the present invention is effective.
[0063]
In addition to the above embodiment, there is a method of expanding at the initial stage of execution. If there is some margin in the amount of memory installed in the device, the number of garbage collections can be reduced by securing the necessary memory in advance. In this case, if k = ∞ by the above-described method, the initial memory size becomes equal to the previous final memory size. By setting the initial memory size in this way, the number of garbage collection can be reduced.
[0064]
【The invention's effect】
According to the present invention, memory expansion can be performed efficiently, and the number of times memory expansion is required in garbage collection can be greatly reduced. Therefore, it is possible to speed up the operation of a processing system that requires garbage collection.
[0065]
The following items are further disclosed with respect to the above description.
(1) Based on the garbage collection execution means, the garbage collection recording means for recording the number of times of garbage collection and the memory usage after executing the garbage collection, and the records of the garbage collection recording means, Extended memory amount conversion means for obtaining a memory expansion chart that defines an extended memory amount when memory expansion is required by executing garbage collection, and extended memory amount holding means for holding the extended memory amount obtained by the extended memory amount conversion means And a memory expansion unit that refers to the expansion memory amount holding unit and determines the expansion memory amount with reference to the memory expansion chart when memory expansion is required. From a certain number of garbage collection starts Seek time of increasing the number of memory usage exceeds the predetermined number, the total memory usage of that time the total memory usage after a certain number of times.
[0066]
(2) Based on the garbage collection executing means, the garbage collection recording means for recording the number of times of garbage collection and the memory usage after executing the garbage collection, and the records of the garbage collection recording means, Extended memory amount conversion means for obtaining a memory expansion chart that defines an extended memory amount when memory expansion is required by executing garbage collection, and extended memory amount holding means for holding the extended memory amount obtained by the extended memory amount conversion means And a memory expansion unit that refers to the expansion memory amount holding unit and determines the expansion memory amount with reference to the memory expansion chart when memory expansion is required. Within a certain number of garbage collection starts If case of increasing the total memory usage by There were frequent occurrences, changing the memory usage of the end of the total memory usage start time period previously executed, it is executed after a period.
[0067]
(3) In the memory management device according to (1) or (2) above, when the number of times of garbage collection of the memory amount after conversion obtained in advance is executed more than N, it is executed exceeding N Record additional garbage collection records.
[0068]
(4) Based on the garbage collection execution means, the garbage collection recording means for recording the number of times of garbage collection and the memory usage after executing the garbage collection, and the garbage collection recording means, Extended memory amount conversion means for obtaining a memory expansion chart that defines an extended memory amount when memory expansion is required by executing garbage collection, and extended memory amount holding means for holding the extended memory amount obtained by the extended memory amount conversion means And a memory expansion unit that refers to the expansion memory amount holding unit and determines the expansion memory amount with reference to the memory expansion chart when memory expansion is required. Is the total amount of memory at the end of previous program execution Determine the total amount of memory in accordance with the recording, to ensure the said total memory amount at early time points of execution.
[Brief description of the drawings]
FIG. 1 is a diagram showing a basic configuration of the present invention.
FIG. 2 is an operation explanatory diagram of a basic configuration of the present invention.
FIG. 3 is a schematic explanatory diagram of an operation according to the embodiment of the present invention.
FIG. 4 is a diagram illustrating an example of a recording format of memory usage according to the present invention.
FIG. 5 is a diagram showing a flowchart of recording of a memory size according to the present invention.
FIG. 6 is a diagram showing a first embodiment of a conversion method for memory expansion recording according to the present invention.
FIG. 7 is a diagram showing a second embodiment of a memory expansion recording conversion method according to the present invention.
FIG. 8 is a flowchart of a memory size recording conversion method according to the present invention.
FIG. 9 is a flowchart of the first embodiment of the present invention.
FIG. 10 is a diagram showing a flowchart of the second embodiment of the present invention.
[Explanation of symbols]
1: Program executing means 2: GC means 3: Memory 4: GC recording means 5: Extended memory amount converting means 6: Extended memory amount holding means 7: Memory expanding means

Claims (4)

ガベージコレクション実行手段と,ガベージコレクションを実行する毎にガベージコレクションの回数とガベージコレクションを実行した後の総メモリ量を記録するガベージコレクション記録手段と,
以前の各ガベージコレクションの動作時に前記ガベージコレクション記録手段により作成された記録結果に対して,各ガベージコレクションの回数 (n) の時点 (N) から一定回数 (k) 内である,その後の時点 (N 1) の総メモリ量を , 前記の回数 (n) の時点 (N) における総メモリ量として設定することにより各ガベージコレクションの回数に対応して変換された総メモリ量が設定されたメモリ拡張チャートを求める拡張メモリ量変換手段と,求めたメモリ拡張チャートを保持する拡張メモリ量保持手段と,
前記拡張メモリ量変換手段によりメモリ拡張チャートを作成後に,メモリ拡張を必要とする場合に,前記拡張メモリ量保持手段のメモリ拡張チャートを参照し,その時のガベージコレクションの回数に対応して設定された値から拡張メモリ量を決定するメモリ拡張手段とを備えることを特徴とするメモリ管理装置。
Garbage collection execution means, and a garbage collection recording means for recording the number of times of garbage collection and the total memory amount after executing garbage collection each time garbage collection is executed,
The recording results produced by the garbage collection recording means during the operation of each of the previous garbage collection, is within a predetermined number of times (k) from the time (N) of the number of each garbage collection (n), then the time ( N + 1)) is set as the total memory amount at the time (N) of the above-mentioned number (n) , and the memory in which the total memory amount converted corresponding to the number of garbage collections is set An extended memory amount conversion means for obtaining an extended chart, an extended memory amount holding means for holding the obtained memory expansion chart ,
After creating a memory expansion chart by the amount of extended memory converting means, when in need of memory expansion, with reference to the memory expansion chart of the amount of extended memory holding means is set to correspond to the number of garbage collection at that time A memory management device comprising memory expansion means for determining an expanded memory amount from a value .
ガベージコレクション実行手段と,ガベージコレクションを実行する毎にガベージコレクションの回数とガベージコレクションを実行した後の総メモリ量を記録するガベージコレクション記録手段と,以前の各ガベージコレクションの動作時に前記ガベージコレクション記録手段により作成された記録結果に対して,各ガベージコレクションの回数 (n) の時点 (N) から一定回数 (k) 内であり,総メモリ量の増加回数が一定数を越える期間が短い期間で隣接していると,時点 (N) の総メモリ量を前記短い期間で隣接して実行されたガベージコレクションの終了時刻の総メモリ量として設定することにより各ガベージコレクションの回数に対応して変換された総メモリ量が設定されたメモリ拡張チャートを求める拡張メモリ量変換手段と,求めたメモリ拡張チャートを保持する拡張メモリ量保持手段と,
前記拡張メモリ量変換手段によりメモリ拡張チャートを作成後に,メモリ拡張を必要とする場合に,前記拡張メモリ量保持手段のメモリ拡張チャートを参照し,その時のガベージコレクションの回数に対応して設定された値から拡張メモリ量を決定するメモリ拡張手段とを備えることを特徴とするメモリ管理装置。
Garbage collection execution means, garbage collection recording means for recording the number of times of garbage collection and the total amount of memory after executing garbage collection every time garbage collection is executed, and said garbage collection recording means at the time of each previous garbage collection operation The recording results created in step 1 are within a certain number of times (k) from the time (N) of each garbage collection (n) , and the period of time when the total memory increase exceeds the certain number is short and adjacent. The total memory amount at the time (N) is set as the total memory amount at the end time of the garbage collection executed adjacently in the short period, and converted according to the number of times of each garbage collection. and extended memory amount conversion means for obtaining a memory expansion chart total memory amount is set, the memory expansion obtained And amount of extended memory holding means for holding a chart,
After creating a memory expansion chart by the amount of extended memory converting means, when in need of memory expansion, with reference to the memory expansion chart of the amount of extended memory holding means is set to correspond to the number of garbage collection at that time A memory management device comprising memory expansion means for determining an expanded memory amount from a value .
ガベージコレクション実行プログラムと,
ガベージコレクションを実行する毎にガベージコレクションの回数とガベージコレクションを実行した後の総メモリ量を記録するガベージコレクション記録プログラムと,
以前の各ガベージコレクションの動作時に前記ガベージコレクション記録プログラムにより作成された記録結果について,各ガベージコレクションの回数 (n) の時点 (N) から一定回数 (k) 内である,その後の時点 (N 1) の総メモリ量を , 前記の回数 (n) の時点 (N) における総メモリ量として設定することにより各ガベージコレクションの回数に対応して変換された総メモリ量が設定されたメモリ拡張チャートを求める拡張メモリ量変換プログラムと,
プログラムの実行においてメモリ拡張を必要とした場合に,前記メモリ拡張チャートに基づいて拡張メモリ量を決定するメモリ拡張プログラムとを記憶することを特徴とするメモリ管理プログラムを記憶した記憶媒体。
A garbage collection execution program,
A garbage collection recording program that records the number of times garbage collection is performed and the total amount of memory after the garbage collection is performed,
Recording the results created by each of the previous garbage collection the garbage collection recorded program during operation of a the time constant from (N) number (k) of the number of each garbage collection (n), subsequent point in time (N + The memory expansion chart in which the total memory amount converted corresponding to the number of times of each garbage collection is set by setting the total memory amount of 1) as the total memory amount at the time (N) of the above number of times (n) An extended memory conversion program for obtaining
A memory medium storing a memory management program for storing a memory expansion program for determining an expansion memory amount based on the memory expansion chart when memory expansion is required in executing the program.
ガベージコレクション実行プログラムと
ガベージコレクションを実行する毎にガベージコレクションの回数とガベージコレクションを実行した後の総メモリ量を記録するガベージコレクション記録プログラムと
以前の各ガベージコレクションの動作時に前記ガベージコレクション記録手段により作成された記録結果に対して,各ガベージコレクションの回数 (n) の時点 (N) から一定回数 (k) 内であり,総メモリ量の増加回数が一定数を越える期間が短い期間で隣接していると,時点 (N) の総メモリ量を前記短い期間で隣接して実行されたガベージコレクションの終了時刻の総メモリ量として設定することにより各ガベージコレクションの回数に対応して変換された総メモリ量が設定されたメモリ拡張チャートを求める拡張メモリ量変換プログラムと,
プログラムの実行においてメモリ拡張を必要とした場合に,前記メモリ拡張チャートに基づいて拡張メモリ量を決定するメモリ拡張プログラムとを記憶することを特徴とするメモリ管理プログラムを記憶した記憶媒体。
A garbage collection execution program ,
A garbage collection recording program that records the number of times garbage collection is performed and the total amount of memory after the garbage collection is performed ,
With respect to the recording result created by the garbage collection recording means at the time of each previous garbage collection operation , it is within a certain number of times (k) from the time (N) of the number of times (n) of each garbage collection , and the total amount of memory If the period when the number of increases exceeds a certain number is adjacent in a short period, the total memory amount at time (N) is set as the total memory amount at the end time of garbage collection executed adjacently in the short period An extended memory amount conversion program for obtaining a memory expansion chart in which the total amount of memory converted corresponding to the number of times of each garbage collection is set;
A memory medium storing a memory management program for storing a memory expansion program for determining an expansion memory amount based on the memory expansion chart when memory expansion is required in executing the program.
JP11794698A 1998-04-28 1998-04-28 Memory management device and storage medium storing memory management program Expired - Fee Related JP3795669B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11794698A JP3795669B2 (en) 1998-04-28 1998-04-28 Memory management device and storage medium storing memory management program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11794698A JP3795669B2 (en) 1998-04-28 1998-04-28 Memory management device and storage medium storing memory management program

Publications (2)

Publication Number Publication Date
JPH11312117A JPH11312117A (en) 1999-11-09
JP3795669B2 true JP3795669B2 (en) 2006-07-12

Family

ID=14724154

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11794698A Expired - Fee Related JP3795669B2 (en) 1998-04-28 1998-04-28 Memory management device and storage medium storing memory management program

Country Status (1)

Country Link
JP (1) JP3795669B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4170988B2 (en) 2003-05-09 2008-10-22 富士通株式会社 Risk prediction / avoidance method, system, program, and recording medium for execution environment
JP3688286B2 (en) * 2003-06-09 2005-08-24 三菱電機株式会社 Information storage control device, information storage control method, and information storage control program
KR100608606B1 (en) 2004-01-28 2006-08-03 삼성전자주식회사 Method for adaptive garbage collection and device employing the method
JP5889270B2 (en) 2013-12-13 2016-03-22 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Method, program and system for reducing stack scan cost

Also Published As

Publication number Publication date
JPH11312117A (en) 1999-11-09

Similar Documents

Publication Publication Date Title
JP3763992B2 (en) Data processing apparatus and recording medium
JP3386823B2 (en) File management method and device
JP3795669B2 (en) Memory management device and storage medium storing memory management program
JP4304974B2 (en) Data management method for cache memory and information processing apparatus
JPH10177425A (en) Computer system
JP2624170B2 (en) Logical deletion data physical deletion method
JP2762816B2 (en) Transaction execution trace information collection method
JP3260711B2 (en) Memory patrol method and control circuit
JP2500735B2 (en) Checkpoint / restart controller
JP3949364B2 (en) File processing method and storage medium
JP2002342269A (en) Method for optimizing number of resource management table, system conducting the same and processing program
JP3497053B2 (en) Processing method in online database management system and online database management system
JP2586330B2 (en) Logical deletion data management method
JP3757740B2 (en) Information processing apparatus, information processing method, and recording medium
JP3094477B2 (en) Virtual storage management method
JPH09319643A (en) Data base procedure sharing means
JPH08263340A (en) File management system and method
JPH1021124A (en) Automatic optimization system for database system and method therefor
JPH0642208B2 (en) Stack extension check method
JPH04328647A (en) Method and device for automatic file extension
JPH05165686A (en) Data store control system
JPH0210444A (en) Work file management system for data base system
JPH01149141A (en) Work file managing system in knowledge base system
JPH05181717A (en) Data base application control system
JPH04105128A (en) High speed command starting system by residence

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060124

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060324

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060411

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060413

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090421

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100421

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110421

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110421

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120421

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130421

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140421

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees