JP2007328628A - MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT PROGRAM, AND INFORMATION PROCESSING DEVICE - Google Patents
MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT PROGRAM, AND INFORMATION PROCESSING DEVICE Download PDFInfo
- Publication number
- JP2007328628A JP2007328628A JP2006160120A JP2006160120A JP2007328628A JP 2007328628 A JP2007328628 A JP 2007328628A JP 2006160120 A JP2006160120 A JP 2006160120A JP 2006160120 A JP2006160120 A JP 2006160120A JP 2007328628 A JP2007328628 A JP 2007328628A
- Authority
- JP
- Japan
- Prior art keywords
- memory
- area
- unused
- memory management
- unused area
- 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.)
- Pending
Links
Images
Abstract
【課題】メモリ管理プログラムによるメモリ領域の割り当てに関して、アプリケーションプログラムとメモリとのミスマッチを防止できるようにする。
【解決手段】メモリ管理プログラムによるメモリ管理方法であって、アプリケーションプログラムから当該メモリ管理プログラムにメモリ領域の確保を要求する領域確保要求であって、メモリ領域を確保するメモリをアプリケーションプログラムが指定できるような領域確保要求、に応じてメモリ領域を確保し、前記領域確保要求に応じて確保されたメモリ領域を前記アプリケーションプログラムに割り当てるメモリ管理方法。
【選択図】図3A memory area is allocated by a memory management program so that a mismatch between an application program and a memory can be prevented.
A memory management method using a memory management program, wherein an application program can specify an area reservation request for requesting a memory area reservation from an application program to the memory management program, and the application program can specify a memory area to be secured. A memory management method for allocating a memory area in response to an area allocation request and allocating the memory area allocated in response to the area allocation request to the application program.
[Selection] Figure 3
Description
本発明は、メモリ管理方法、メモリ管理プログラム、及び情報処理装置に関する。 The present invention relates to a memory management method, a memory management program, and an information processing apparatus.
PCやIT機器等の情報処理装置には通常、メモリ管理機構が存在する。情報処理装置のメモリ管理機構は、ハードウェア的に実現される場合もあれば、ソフトウェア的に実現される場合もある(特許文献1、特許文献2、非特許文献1、非特許文献2)。近年の情報処理装置には、OSの一部として、メモリを管理するためのメモリ管理プログラムが実装されている事が多い。メモリ管理プログラムによるメモリ領域の割り当てにより、複数のアプリケーションプログラムが共通のメモリを効率的に共用できるようになる。
A memory management mechanism usually exists in an information processing apparatus such as a PC or an IT device. The memory management mechanism of the information processing apparatus may be realized by hardware or may be realized by software (
しかしながら、従来のメモリ管理プログラムによるメモリ領域の割り当てでは、アプリケーションプログラムとメモリのミスマッチが起こる事があった。例えば、混載DRAM等の近接メモリが必要なアプリケーションプログラムに、外付けDRAM等の遠隔メモリのメモリ領域が割り当てられたり、逆に、外付けSRAM等の遠隔メモリで十分なアプリケーションプログラムに、混載SRAM等の近接メモリのメモリ領域が割り当てられたりすることがあった。
本発明は、メモリ管理プログラムによるメモリ領域の割り当てに関して、アプリケーションプログラムとメモリとのミスマッチを防止できるようにすることを課題とする。 An object of the present invention is to prevent a mismatch between an application program and a memory with respect to allocation of a memory area by a memory management program.
本発明は、メモリ管理プログラムによるメモリ管理方法であって、アプリケーションプログラムから当該メモリ管理プログラムにメモリ領域の確保を要求する領域確保要求であって、メモリ領域を確保するメモリをアプリケーションプログラムが指定できるような領域確保要求、に応じてメモリ領域を確保し、前記領域確保要求に応じて確保されたメモリ領域を前記アプリケーションプログラムに割り当てるメモリ管理方法に係る。 The present invention is a memory management method using a memory management program, which is an area reservation request for requesting a memory area to be reserved from the application program to the memory management program, so that the application program can specify the memory to secure the memory area. The present invention relates to a memory management method for allocating a memory area in response to an area allocation request and allocating a memory area allocated in response to the area allocation request to the application program.
本発明は、メモリ管理プログラムであって、アプリケーションプログラムから当該メモリ管理プログラムにメモリ領域の確保を要求する領域確保要求であって、メモリ領域を確保するメモリをアプリケーションプログラムが指定できるような領域確保要求、に応じてメモリ領域を確保し、前記領域確保要求に応じて確保されたメモリ領域を前記アプリケーションプログラムに割り当てるメモリ管理方法、をコンピュータに実行させるメモリ管理プログラムに係る。 The present invention relates to a memory management program, which is an area allocation request for requesting the memory management program to allocate a memory area from the application program, and an area allocation request that allows the application program to specify a memory to allocate the memory area , And a memory management program for causing a computer to execute a memory management method for allocating a memory area allocated in response to the area allocation request to the application program.
本発明は、メモリ管理プログラムが実装された情報処理装置であって、アプリケーションプログラムから当該メモリ管理プログラムにメモリ領域の確保を要求する領域確保要求であって、メモリ領域を確保するメモリをアプリケーションプログラムが指定できるような領域確保要求、に応じてメモリ領域を確保し、前記領域確保要求に応じて確保されたメモリ領域を前記アプリケーションプログラムに割り当てるメモリ管理方法、をコンピュータに実行させるメモリ管理プログラム、が実装された情報処理装置に係る。 The present invention is an information processing apparatus in which a memory management program is installed, and is an area securing request for requesting the memory management program to secure a memory area from the application program. A memory management program for causing a computer to execute a memory management method for allocating a memory area according to an area allocation request that can be specified and allocating the memory area allocated according to the area allocation request to the application program is implemented. Related to the information processing apparatus.
本発明によれば、メモリ管理プログラムによるメモリ領域の割り当てに関して、アプリケーションプログラムとメモリとのミスマッチを防止できるようになる。 According to the present invention, a mismatch between an application program and a memory can be prevented with respect to allocation of a memory area by a memory management program.
(第1実施例)
図1は、情報処理装置101のシステム構成図である。図1の情報処理装置101は、CPU111と、第1メモリ112と、第2メモリ113と、HDD114とを具備している。CPU111は、種々の情報処理を実行するためのプロセッサである。第1メモリ112は、CPU111と同じチップに搭載されている混載DRAMである。第2メモリ113は、CPU111と異なるチップに搭載されている外付けDRAMである。HDD114は、種々の情報を記憶するためのストレージである。図1の情報処理装置101には、メモリ管理プログラム121と、複数のアプリケーションプログラム122とが装備されている。これらのプログラムは、HDD114内に格納されており、CPU111上で動作する。
(First embodiment)
FIG. 1 is a system configuration diagram of the
図2は、第1実施例のメモリ管理について説明するためのデータ構造図である。 FIG. 2 is a data structure diagram for explaining the memory management of the first embodiment.
メモリ管理プログラム121は、各メモリの管理情報をメモリ管理情報テーブル201に管理する。メモリ管理情報テーブル201には、第1メモリ112の管理情報211と第2メモリ113の管理情報221とが管理される。各メモリの管理情報は、そのメモリを識別するためのID情報と、そのメモリの先頭の未使用領域(アドレスが最小の未使用領域)へのポインタ(先頭領域ポインタ)等により構成される。第1メモリ112の管理情報211は、第1メモリ112のID情報212と、第1メモリ112の先頭領域ポインタ213等からなる。第2メモリ113の管理情報221は、第2メモリ113のID情報222と、第2メモリ113の先頭領域ポインタ223等からなる。
The
使用中のメモリには、使用領域(使用中のメモリ領域)301と、未使用領域(使用中ではないメモリ領域)302とが存在する。メモリ管理プログラム121は、各メモリの各未使用領域302に、アドレスの増加方向に隣接する未使用領域へのリンク情報(増加方向リンク情報)311と、その未使用領域のサイズ321とを格納する。各未使用領域302は、増加方向リンク情報311の格納領域と、サイズ321の格納領域と、残りの領域331からなる。図2には、第1メモリ112の使用領域301と未使用領域302とが図示されており、図中の下方向がアドレスの増加方向となっており、図中の上方向がアドレスの減少方向となっている。
In the memory in use, there are a used area (memory area in use) 301 and an unused area (memory area not in use) 302. The
図3は、第1実施例のメモリ管理について説明するためのフローチャート図である。 FIG. 3 is a flowchart for explaining memory management of the first embodiment.
アプリケーションプログラム122がメモリを必要とする場合、当該アプリケーションプログラム122からメモリ管理プログラム121に、メモリ領域の確保を要求する領域確保要求が送信される(ステップS101)。当該領域確保要求では、確保するメモリ領域のサイズと、メモリ領域を確保するメモリとを指定することができる。即ち、どのメモリからどのようなサイズのメモリ領域を確保するかを、領域確保要求を送信するアプリケーションプログラム122が指定できるのである。
When the
メモリ管理プログラム121は、上記領域確保要求を受信すると、領域確保要求で指定されたメモリを、メモリ管理情報テーブル201から検索する(ステップS111)。当該検索では、各メモリのID情報(212,222)を利用して、各メモリが識別される。次に、メモリ管理プログラム121は、領域確保要求で指定されたサイズのメモリ領域を確保できる未使用領域を、検索されたメモリから探索する(ステップS112)。当該探索は、当該メモリの先頭領域ポインタ(213,223)を利用して、当該メモリの先頭の未使用領域から開始され、当該メモリの各未使用領域の増加方向リンク情報(311)を利用して、アドレスの増加方向に進行していく。
When receiving the area reservation request, the
メモリ管理プログラム121は、ある未使用領域302から指定サイズ分のメモリ領域を確保できると判断した場合(ステップS113)、その未使用領域302の先頭アドレスを起点とする指定サイズ分のメモリ領域を確保し(ステップS121)、当該メモリ領域を上記アプリケーションプログラム122に割り当てる(ステップS122)。この際、当該未使用領域302のサイズが指定サイズよりも大きい場合には、当該未使用領域302は指定サイズ分だけ小さくなって残存するので、当該未使用領域302のサイズ321の値が指定サイズ分だけ小さい値に変更される。一方、当該未使用領域302のサイズが指定サイズと等しい場合には、当該未使用領域302は消滅するので、当該未使用領域302の1つ前の未使用領域302の増加方向リンク情報311が、当該未使用領域302から当該未使用領域302の1つ後の未使用領域302に変更される。次に、メモリ管理プログラム121から上記アプリケーションプログラム122に、割り当てられたメモリ領域の先頭アドレスが通知される(ステップS123)。
When the
他方、メモリ管理プログラム121は、どの未使用領域302からも指定サイズ分のメモリ領域を確保できないと判断した場合(ステップS114)、上記アプリケーションプログラム122にエラーを通知する(ステップS124)。
On the other hand, if the
このように、第1実施例では、メモリ領域の確保を要求する領域確保要求にて、メモリ領域を確保するメモリを指定することができる。即ち、どのメモリからメモリ領域を確保するかを、領域確保要求を送信するアプリケーションプログラム122が指定できるのである。例えば、近接メモリが必要なアプリケーションプログラム122が、混載DRAMである第1メモリ112を指定したり、遠隔メモリで十分なアプリケーションプログラム122が、外付けDRAMである第2メモリ113を指定したりすることができる。このようにして、第1実施例では、メモリ管理プログラム121によるメモリ領域の割り当てに関して、アプリケーションプログラム122とメモリとのミスマッチを防止できるようになっている。
As described above, in the first embodiment, the memory for securing the memory area can be designated by the area securing request for securing the memory area. That is, the
なお、第1実施例におけるメモリ指定は、「第1メモリを指定」「第2メモリを指定」のようにメモリ毎に行う事にしてもよいし、「第1グループのメモリを指定」「第2グループのメモリを指定」のようにメモリのグループ毎に行う事にしてもよい。例えば、情報処理装置101に複数の混載DRAMと複数の外付けDRAMとが実装されている場合、混載DRAMと外付けDRAMとでグループ分けする事が考えられる。メモリのグループ分けは、「混載か外付けか」「DRAMかSRAMか」「旧型か新型か」のように、メモリ(物理メモリ)の属性(物理属性)に基づいて行う事が望ましい。アプリケーションプログラム122にとっては、使用するメモリの属性が重要であるからである。グループ毎のメモリ指定は、「ID=1のグループのメモリを指定」「ID=2のグループのメモリを指定」のようにグループのIDで行う事にしてもよいし、「混載DRAMを指定」「外付けDRAMを指定」のようにメモリの属性で行う事にしてもよい。メモリ管理プログラム121は、あるグループからどのメモリを選択するか(混載DRAMグループからどの混載DRAMを選択するか、外付けDRAMグループからどの混載DRAMを選択するか等)を、一定の規則に基づいて決定する(各メモリのID番号順等)ようにしてもよいし、ランダムに決定するようにしてよい。
The memory designation in the first embodiment may be performed for each memory such as “designation of the first memory” and “designation of the second memory”, or “designation of memory of the first group”, “designation of the first group”. It may be performed for each group of memories, such as “specify two groups of memories”. For example, when a plurality of embedded DRAMs and a plurality of external DRAMs are mounted on the
また、第1実施例の領域確保要求におけるメモリ指定は、「必須要件」(指定しなければならない)としても「任意要件」(指定しても指定しなくてもよい)としてもよい。メモリ指定を任意要件とする場合、メモリ指定のない領域確保要求を受信したメモリ管理プログラム121は、第1メモリ112と第2メモリ113のどちらからメモリ領域を確保してもよいことにしてもよい(図4)。この場合には例えば、先ず第1メモリ112が探索対象となり、次に第2メモリ113が探索対象となるようにしてもよい。この場合、ステップS112,S113,S114の(ループ)探索処理が、第1メモリ112と第2メモリ113について実行される。更には、第1メモリ112と第2メモリ113にまたがってメモリ領域を確保してもよいことにしてもよい。
Also, the memory designation in the area securing request of the first embodiment may be “required requirement” (must be specified) or “optional requirement” (may be specified or not specified). When memory specification is an arbitrary requirement, the
ステップS124について補足する。指定メモリから指定サイズ分のメモリ領域が確保されなかった場合には、ここではエラーが通知される(ステップS124)が、代わりに非指定メモリから指定サイズ分のメモリが確保されるようにしてもよい。この場合、ステップS112,S113,S114の(ループ)探索処理が、指定メモリと非指定メモリについて実行される。非指定メモリからメモリを確保するか否かについては、アプリケーションプログラム122が領域確保要求にて指定できるようにしてよい。
It supplements about step S124. If a memory area for the specified size is not secured from the designated memory, an error is notified here (step S124). Instead, a memory for the designated size is secured from the non-designated memory. Good. In this case, the (loop) search process of steps S112, S113, and S114 is executed for the designated memory and the non-designated memory. Whether or not to secure memory from the non-designated memory may be specified by the
(第2実施例)
第2実施例は、第1実施例の変形実施例である。よって、第2実施例については、第1実施例との相違点を中心に説明する。図1のシステム構成図は、第1実施例と第2実施例とで共通である。
(Second embodiment)
The second embodiment is a modified embodiment of the first embodiment. Therefore, the second embodiment will be described focusing on the differences from the first embodiment. The system configuration diagram of FIG. 1 is common to the first embodiment and the second embodiment.
図5は、第2実施例のメモリ管理について説明するためのデータ構造図である。 FIG. 5 is a data structure diagram for explaining the memory management of the second embodiment.
使用中のメモリには、使用領域(使用中のメモリ領域)301と、未使用領域(使用中ではないメモリ領域)302とが存在する。メモリ管理プログラム121は、各メモリの各未使用領域302に、アドレスの増加方向に隣接する未使用領域へのリンク情報(増加方向リンク情報)311と、アドレスの減少方向に隣接する未使用領域へのリンク情報(減少方向リンク情報)312と、その未使用領域のサイズ321とを格納する。各未使用領域302は、増加方向リンク情報311の格納領域と、減少方向リンク情報312の格納領域と、サイズ321の格納領域と、残りの領域331からなる。図5には、第1メモリ112の使用領域301と未使用領域302とが図示されており、図中の下方向がアドレスの増加方向となっており、図中の上方向がアドレスの減少方向となっている。
In the memory in use, there are a used area (memory area in use) 301 and an unused area (memory area not in use) 302. The
図6は、第2実施例のメモリ管理について説明するためのフローチャート図である。 FIG. 6 is a flowchart for explaining memory management of the second embodiment.
アプリケーションプログラム122がメモリを必要とする場合、当該アプリケーションプログラム122からメモリ管理プログラム121に、メモリ領域の確保を要求する領域確保要求が送信される(ステップS101)。当該領域確保要求では、確保するメモリ領域のサイズと、メモリ領域を確保するメモリと、未使用領域を探索していく方向(アドレスの増加方向か減少方向か)とを指定することができる。即ち、どのメモリからどのようなサイズのメモリ領域をどのような方向に探索して確保するかを、領域確保要求を送信するアプリケーションプログラム122が指定できるのである。
When the
メモリ管理プログラム121は、上記領域確保要求を受信すると、領域確保要求で指定されたメモリを、メモリ管理情報テーブル201から検索する(ステップS111)。当該検索では、各メモリのID情報(212,222)を利用して、各メモリが識別される。次に、メモリ管理プログラム121は、領域確保要求で指定されたサイズのメモリ領域を確保できる未使用領域を、検索されたメモリから探索する(ステップS112,ステップS212)。領域確保要求で指定された探索方向がアドレス増加方向である場合(ステップS311)、当該探索は、当該メモリの先頭領域ポインタ(213,223)を利用して、当該メモリの先頭の未使用領域から開始され、当該メモリの各未使用領域の増加方向リンク情報(311)を利用して、アドレスの増加方向に進行していく(ステップS112)。領域確保要求で指定された探索方向がアドレス減少方向である場合(ステップS311)、当該探索は、当該メモリの先頭領域ポインタ(213,223)と当該メモリの各未使用領域の増加方向リンク情報(311)とを利用して、当該メモリの末尾の未使用領域から開始され、当該メモリの各未使用領域の減少方向リンク情報(312)を利用して、アドレスの減少方向に進行していく(ステップS212)。後者の場合、先頭領域ポインタは、メモリの先頭の未使用領域を探すのに利用され、増加方向リンク情報は、メモリの先頭の未使用領域からメモリの末尾の未使用領域へと辿っていく(ステップS312)のに利用される。
When receiving the area reservation request, the
ステップS113乃至S124については説明済なので、以下、ステップS213乃至S224について説明する。 Since steps S113 to S124 have been described, steps S213 to S224 will be described below.
メモリ管理プログラム121は、ある未使用領域302から指定サイズ分のメモリ領域を確保できると判断した場合(ステップS213)、その未使用領域302の末尾アドレスを終点とする指定サイズ分のメモリ領域を確保し(ステップS221)、当該メモリ領域を上記アプリケーションプログラム122に割り当てる(ステップS222)。この際、当該未使用領域302のサイズが指定サイズよりも大きい場合には、当該未使用領域302は指定サイズ分だけ小さくなって残存するので、当該未使用領域302のサイズ321の値が指定サイズ分だけ小さい値に変更される。一方、当該未使用領域302のサイズが指定サイズと等しい場合には、当該未使用領域302は消滅するので、当該未使用領域302の1つ前の未使用領域302の増加方向リンク情報311が、当該未使用領域302から当該未使用領域302の1つ後の未使用領域302に変更されて、当該未使用領域302の1つ後の未使用領域302の減少方向リンク情報312が、当該未使用領域302から当該未使用領域302の1つ前の未使用領域302に変更される(ステップS121及びS122でも同様である)。次に、メモリ管理プログラム121から上記アプリケーションプログラム122に、割り当てられたメモリ領域の先頭アドレスが通知される(ステップS223)。
If the
他方、メモリ管理プログラム121は、どの未使用領域302からも指定サイズ分のメモリ領域を確保できないと判断した場合(ステップS214)、上記アプリケーションプログラム122にエラーを通知する(ステップS224)。
On the other hand, if the
このように、第1実施例と第2実施例では、未使用領域302に格納されるリンク情報の種類が相違する。第1実施例では、リンク情報として増加方向リンク情報311のみが格納されるのに対して、第2実施例では、リンク情報として増加方向リンク情報311と減少方向リンク情報312とが格納される。即ち、第1実施例では、未使用領域のリンクリストが「単方向リンクリスト構造」となっているのに対して、第2実施例では、未使用領域のリンクリストが「双方向リンクリスト構造」となっている。
As described above, the types of link information stored in the
よって、第2実施例では、メモリ領域を確保する未使用領域を、アドレスの増加方向に探索していくこともできるし、アドレスの減少方向に探索していくこともできる。これにより、第2実施例では、メモリ領域のフラグメンテーション(分断化)を防止することができる。 Therefore, in the second embodiment, an unused area for securing a memory area can be searched for in the address increasing direction, or can be searched for in the address decreasing direction. As a result, in the second embodiment, fragmentation of the memory area can be prevented.
その具体例を図7に示す。図7では、アドレスの並び順は、第1メモリ112が前方で第2メモリ113が後方となっている。第1メモリ112での未使用領域の探索方向は、アドレスの増加方向であり、未使用領域Aからメモリ領域を確保できる場合には、未使用領域Aの先頭アドレスaを起点X1とするメモリ領域Xが確保される。第2メモリ113での未使用領域の探索方向は、アドレスの減少方向であり、未使用領域Bからメモリ領域を確保できる場合には、未使用領域Bの末尾アドレスbを終点Y2とするメモリ領域Yが確保される。これにより、メモリ領域Xとメモリ領域Yの確保が、フラグメンテーションの原因となることが防止される。
A specific example is shown in FIG. In FIG. 7, the arrangement order of the addresses is such that the
なお、未使用領域の探索方向は、アプリケーションプログラム122が指定できるようにしても、アプリケーションプログラム122が指定できないようにしてもよい。
Note that the search direction of the unused area may be specified by the
(第3実施例)
第3実施例は、第2実施例の変形実施例である。よって、第3実施例については、第2実施例との相違点を中心に説明する。図1のシステム構成図は、第2実施例と第3実施例とで共通である。
(Third embodiment)
The third embodiment is a modified embodiment of the second embodiment. Therefore, the third embodiment will be described focusing on the differences from the second embodiment. The system configuration diagram of FIG. 1 is common to the second embodiment and the third embodiment.
図8は、第3実施例のメモリ管理について説明するためのデータ構造図である。 FIG. 8 is a data structure diagram for explaining the memory management of the third embodiment.
メモリ管理プログラム121は、各メモリの管理情報をメモリ管理情報テーブル201に管理する。メモリ管理情報テーブル201には、第1メモリ112の管理情報211と第2メモリ113の管理情報221とが管理される。各メモリの管理情報は、そのメモリを識別するためのID情報と、そのメモリの先頭の未使用領域(アドレスが最小の未使用領域)へのポインタ(先頭領域ポインタ)と、そのメモリの末尾の未使用領域(アドレスが最大の未使用領域)へのポインタ(末尾領域ポインタ)等により構成される。第1メモリ112の管理情報211は、第1メモリ112のID情報212と、第1メモリ112の先頭領域ポインタ213と、第1メモリ112の末尾領域ポインタ214等からなる。第2メモリ113の管理情報221は、第2メモリ113のID情報222と、第2メモリ113の先頭領域ポインタ223と、第2メモリ113の末尾領域ポインタ224等からなる。
The
図9は、第3実施例のメモリ管理について説明するためのフローチャート図である。 FIG. 9 is a flowchart for explaining memory management of the third embodiment.
アプリケーションプログラム122がメモリを必要とする場合、当該アプリケーションプログラム122からメモリ管理プログラム121に、メモリ領域の確保を要求する領域確保要求が送信される(ステップS101)。当該領域確保要求では、確保するメモリ領域のサイズと、メモリ領域を確保するメモリと、未使用領域を探索していく方向(アドレスの増加方向か減少方向か)とを指定することができる。即ち、どのメモリからどのようなサイズのメモリ領域をどのような方向に探索して確保するかを、領域確保要求を送信するアプリケーションプログラム122が指定できるのである。
When the
メモリ管理プログラム121は、上記領域確保要求を受信すると、領域確保要求で指定されたメモリを、メモリ管理情報テーブル201から検索する(ステップS111)。当該検索では、各メモリのID情報(212,222)を利用して、各メモリが識別される。次に、メモリ管理プログラム121は、領域確保要求で指定されたサイズのメモリ領域を確保できる未使用領域を、検索されたメモリから探索する(ステップS112,ステップS212)。領域確保要求で指定された探索方向がアドレス増加方向である場合(ステップS311)、当該探索は、当該メモリの先頭領域ポインタ(213,223)を利用して、当該メモリの先頭の未使用領域から開始され、当該メモリの各未使用領域の増加方向リンク情報(311)を利用して、アドレスの増加方向に進行していく(ステップS112)。領域確保要求で指定された探索方向がアドレス減少方向である場合(ステップS311)、当該探索は、当該メモリの末尾領域ポインタ(214,224)を利用して、当該メモリの末尾の未使用領域から開始され、当該メモリの各未使用領域の減少方向リンク情報(312)を利用して、アドレスの減少方向に進行していく(ステップS212)。ステップS312が存在しないことに留意されたい。
When receiving the area reservation request, the
ステップS113乃至S124については、第1実施例で説明の通りである。ステップS213乃至S224については、第2実施例で説明の通りである。 Steps S113 to S124 are as described in the first embodiment. Steps S213 to S224 are as described in the second embodiment.
このように、第2実施例と第3実施例では、メモリ管理情報テーブルに管理されるポインタの種類が相違する。第2実施例では、ポインタとして先頭領域ポインタのみが管理されるのに対して、第3実施例では、ポインタとして先頭領域ポインタと末尾領域ポインタとが管理される。 As described above, the types of pointers managed in the memory management information table are different between the second embodiment and the third embodiment. In the second embodiment, only the head area pointer is managed as a pointer, whereas in the third embodiment, a head area pointer and a tail area pointer are managed as pointers.
よって、第3実施例では、メモリの先頭の未使用領域を探す際には、そのメモリの先頭領域ポインタを利用することができるし、メモリの末尾の未使用領域を探す際には、そのメモリの末尾領域ポインタを利用することができる。従って、第3実施例では、メモリの末尾の未使用領域を探す際に、メモリの先頭の未使用領域からメモリの末尾の未使用領域へと辿っていく必要はない。これにより、第3実施例では、メモリの末尾の未使用領域に到達するための処理時間が短縮される。即ち、第3実施例では、未使用領域の探索方向がアドレスの減少方向である場合の処理時間のオーバーヘッドが抑制される。 Therefore, in the third embodiment, when searching for the unused area at the beginning of the memory, the start area pointer of the memory can be used, and when searching for the unused area at the end of the memory, the memory Can be used. Therefore, in the third embodiment, when searching for an unused area at the end of the memory, it is not necessary to trace from the unused area at the beginning of the memory to the unused area at the end of the memory. Thereby, in the third embodiment, the processing time for reaching the unused area at the end of the memory is shortened. That is, in the third embodiment, the processing time overhead when the unused area search direction is the address decreasing direction is suppressed.
101 情報処理装置
111 CPU
112 第1メモリ
113 第2メモリ
114 HDD
121 メモリ管理プログラム
122 アプリケーションプログラム
201 メモリ管理情報テーブル
211 第1メモリの管理情報
212 第1メモリのID情報
213 第1メモリの先頭領域ポインタ
214 第1メモリの末尾領域ポインタ
221 第2メモリの管理情報
222 第2メモリのID情報
223 第2メモリの先頭領域ポインタ
224 第2メモリの末尾領域ポインタ
301 使用領域
302 未使用領域
311 増加方向リンク情報(の格納領域)
312 減少方向リンク情報(の格納領域)
321 サイズ(の格納領域)
331 残りの領域
101
112
121
312 Decreasing direction link information (storage area)
321 size (storage area)
331 remaining area
Claims (5)
アプリケーションプログラムから当該メモリ管理プログラムにメモリ領域の確保を要求する領域確保要求であって、メモリ領域を確保するメモリをアプリケーションプログラムが指定できるような領域確保要求、に応じてメモリ領域を確保し、
前記領域確保要求に応じて確保されたメモリ領域を前記アプリケーションプログラムに割り当てるメモリ管理方法。 A memory management method by a memory management program,
A memory area is secured in response to an area securing request that requests the memory management program to secure a memory area from the application program so that the application program can specify the memory that secures the memory area.
A memory management method for allocating a memory area secured in response to the area securing request to the application program.
メモリ領域を確保する未使用領域を、メモリ領域を確保するメモリの先頭の未使用領域からアドレスの増加方向に探索していく場合には、アドレスの増加方向に隣接する未使用領域へのリンク情報を利用して探索を実行し、
メモリ領域を確保する未使用領域を、メモリ領域を確保するメモリの末尾の未使用領域からアドレスの減少方向に探索していく場合には、アドレスの減少方向に隣接する未使用領域へのリンク情報を利用して探索を実行する請求項1に記載のメモリ管理方法。 In each unused area of each memory, link information to an unused area adjacent in the address increasing direction and link information to an unused area adjacent in the address decreasing direction are stored,
When searching for an unused area that secures a memory area from an unused area at the beginning of a memory that secures a memory area in the increasing direction of the address, link information to the unused area adjacent to the increasing direction of the address Perform a search using
When searching for an unused area that secures a memory area from the unused area at the end of the memory that secures the memory area in the address decreasing direction, link information to the unused area adjacent in the address decreasing direction The memory management method according to claim 1, wherein the search is executed by using.
メモリ領域を確保する未使用領域を、メモリ領域を確保するメモリの先頭の未使用領域からアドレスの増加方向に探索していく場合には、そのメモリの先頭の未使用領域へのポインタを利用して探索を開始し、
メモリ領域を確保する未使用領域を、メモリ領域を確保するメモリの末尾の未使用領域からアドレスの減少方向に探索していく場合には、そのメモリの末尾の未使用領域へのポインタを利用して探索を開始する請求項2に記載のメモリ管理方法。 For each memory, a pointer to the unused area at the beginning of the memory and a pointer to the unused area at the end of the memory are managed,
When searching for an unused area that secures a memory area from the unused area at the beginning of the memory that secures the memory area in the direction of increasing addresses, use a pointer to the unused area at the beginning of that memory. Start the search,
When searching the unused area that secures the memory area from the unused area at the end of the memory that secures the memory area in the address decreasing direction, use a pointer to the unused area at the end of the memory. The memory management method according to claim 2, wherein the search is started.
アプリケーションプログラムから当該メモリ管理プログラムにメモリ領域の確保を要求する領域確保要求であって、メモリ領域を確保するメモリをアプリケーションプログラムが指定できるような領域確保要求、に応じてメモリ領域を確保し、
前記領域確保要求に応じて確保されたメモリ領域を前記アプリケーションプログラムに割り当てるメモリ管理方法、をコンピュータに実行させるメモリ管理プログラム。 A memory management program,
A memory area is secured in response to an area securing request that requests the memory management program to secure a memory area from the application program so that the application program can specify the memory that secures the memory area.
A memory management program for causing a computer to execute a memory management method for allocating a memory area secured in response to the area securing request to the application program.
アプリケーションプログラムから当該メモリ管理プログラムにメモリ領域の確保を要求する領域確保要求であって、メモリ領域を確保するメモリをアプリケーションプログラムが指定できるような領域確保要求、に応じてメモリ領域を確保し、
前記領域確保要求に応じて確保されたメモリ領域を前記アプリケーションプログラムに割り当てるメモリ管理方法、をコンピュータに実行させるメモリ管理プログラム、が実装された情報処理装置。 An information processing apparatus in which a memory management program is implemented,
A memory area is secured in response to an area securing request that requests the memory management program to secure a memory area from the application program so that the application program can specify the memory that secures the memory area.
A memory management program that causes a computer to execute a memory management method for allocating a memory area secured in response to the area securing request to the application program.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006160120A JP2007328628A (en) | 2006-06-08 | 2006-06-08 | MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT PROGRAM, AND INFORMATION PROCESSING DEVICE |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006160120A JP2007328628A (en) | 2006-06-08 | 2006-06-08 | MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT PROGRAM, AND INFORMATION PROCESSING DEVICE |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2007328628A true JP2007328628A (en) | 2007-12-20 |
Family
ID=38929043
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2006160120A Pending JP2007328628A (en) | 2006-06-08 | 2006-06-08 | MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT PROGRAM, AND INFORMATION PROCESSING DEVICE |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2007328628A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2015187801A (en) * | 2014-03-27 | 2015-10-29 | 京セラドキュメントソリューションズ株式会社 | Information processor and memory management method |
| JP2016143108A (en) * | 2015-01-30 | 2016-08-08 | 京セラドキュメントソリューションズ株式会社 | Information processing apparatus and memory management program |
-
2006
- 2006-06-08 JP JP2006160120A patent/JP2007328628A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2015187801A (en) * | 2014-03-27 | 2015-10-29 | 京セラドキュメントソリューションズ株式会社 | Information processor and memory management method |
| JP2016143108A (en) * | 2015-01-30 | 2016-08-08 | 京セラドキュメントソリューションズ株式会社 | Information processing apparatus and memory management program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5657641B2 (en) | Data storage device command and interrupt grouping | |
| US20120246436A1 (en) | Combining memory pages having identical content | |
| CN100543703C (en) | Multiprocessor system and method selected with translation lookaside buffer | |
| US20180039523A1 (en) | Information processing system that determines a memory to store program data for a task carried out by a processing core | |
| JP2007026094A (en) | Execution device and application program | |
| CN102567225A (en) | Method and device for managing system memory | |
| JP2020021417A (en) | Database management system and method | |
| CN105874439A (en) | Memory pool management method for sharing memory pool by different computing units, and related computer readable medium and memory pool management device | |
| JP5911548B1 (en) | Apparatus, method, and computer program for scheduling access request to shared memory | |
| US8996773B2 (en) | Computer apparatus and method for distributing interrupt tasks thereof | |
| JP2006301894A (en) | Multiprocessor system and message transfer method for multiprocessor system | |
| US11327808B2 (en) | Decentralized data processing architecture | |
| US11093291B2 (en) | Resource assignment using CDA protocol in distributed processing environment based on task bid and resource cost | |
| JP2007328628A (en) | MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT PROGRAM, AND INFORMATION PROCESSING DEVICE | |
| US20060020701A1 (en) | Thread transfer between processors | |
| JP2005327007A (en) | Integrated computer control program, recording medium for recording its program and integrated system | |
| US10503557B2 (en) | Method of processing OpenCL kernel and computing device therefor | |
| JP2017126172A (en) | Database control program, database control apparatus, and database control method | |
| US20130191839A1 (en) | Information processing apparatus, control method therefor, and computer-readable storage medium | |
| JP2005209206A (en) | Data transfer method for multiprocessor system, multiprocessor system, and processor for executing the method | |
| JPWO2009050764A1 (en) | Information processing apparatus for performing self-diagnosis processing, self-diagnosis processing method, and self-diagnosis processing program | |
| JP5048072B2 (en) | Information search system, information search method and program | |
| JP4888713B2 (en) | Computer system activation method, information processing apparatus, and program | |
| JP2008276321A (en) | Information processing system and method | |
| CN119336264A (en) | Data processing method, data processing device and electronic equipment |