JPH0218637A - Memory control method - Google Patents

Memory control method

Info

Publication number
JPH0218637A
JPH0218637A JP16982888A JP16982888A JPH0218637A JP H0218637 A JPH0218637 A JP H0218637A JP 16982888 A JP16982888 A JP 16982888A JP 16982888 A JP16982888 A JP 16982888A JP H0218637 A JPH0218637 A JP H0218637A
Authority
JP
Japan
Prior art keywords
memory
block
page
blocks
allocated
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
Application number
JP16982888A
Other languages
Japanese (ja)
Inventor
Kouichi Ujioka
氏岡 康一
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.)
NEC Solution Innovators Ltd
Original Assignee
NEC Solution Innovators 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 NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP16982888A priority Critical patent/JPH0218637A/en
Publication of JPH0218637A publication Critical patent/JPH0218637A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten the processing time for control of a memory by dividing a memory space into page units and allocating only the memory blocks having the same size and the same structure into one page. CONSTITUTION:The control information on each page unit of pages 41-43 allocated with the memory blocks A1-A6 or B1 and B2 having the same size and the same structure are stored in a page control block 1. While a memory block control block 2 stores the control information on each block unit of the memory blocks A1-A6 and B1 and B2 which are allocated to the pages 41-43. At the same time, the idle memory block information obtained when the blocks A1-A6, B1 and B2 are deallocated is also stored in the block 2. Then an idle page control block 3 stores the idle page information obtained when the blocks A1-A6 or B1 and B2 of the same kind are all deallocated so as to ensure the reuse of undesired pages 41-43. In such a way, the processing time is shortened.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、動的にメモリを確保し、確保された各メモリ
ブロックの管理方法に関し、特に動的に切出することの
できるメモリ空間が十分確保てきる環境におけるメモリ
管理方法に関する。
Detailed Description of the Invention [Field of Industrial Application] The present invention relates to a method of dynamically allocating memory and managing each allocated memory block, and particularly to a method of dynamically allocating memory and managing each allocated memory block. Concerning memory management methods in an environment where sufficient memory can be secured.

[従来の技術1 従来、この種のメモリ管理方法では、同一の目的で確保
されたメモリブロックをディレクトリを起点とした単一
方向リスト構造で管理し、メモリ上では各種のメモリブ
ロックか混在して割付けられるため、新たなメモリブロ
ックのアロケート、特定のメモリブロックのデアロケー
トおよびデアロケート後のガヘージコレクションなどは
、すべて各メモリブロック間のチェーンをたどりながら
行われていた。
[Conventional technology 1] Conventionally, in this type of memory management method, memory blocks allocated for the same purpose are managed in a unidirectional list structure starting from a directory, and various types of memory blocks are mixed in the memory. Therefore, allocation of a new memory block, deallocation of a specific memory block, and garbage collection after deallocation were all performed while following the chain between each memory block.

[発明か解決しようとする課題] 上述した従来のメモリ管理方法は、メモリ効率を上げる
ためにメモリ空間上に順次メモリブロックをアロケート
し、各種メモリブロックが混在して割付けられているの
で、ある種類のメモリブロック全部を削除するときには
、メモリブロック間のチェーンをたどりながら各メモリ
ブロックを1つ1つデアロケートしなければならず、ま
たデアロケートしたメモリブロックの連続性を意識しな
がらガベージコレクションを行なう必要があり、さらに
新しくメモリブロックをアロケートするとき、以前にデ
アロケートされたメモリブロックがある場合には解放さ
れたメモリブロック間のチェーンをたどりながらアロケ
ートずへきメモリブロックの割付は可能なエリアがある
かを調べ、割付は可能なエリアがなかったときは未使用
メモリにアロケートするので処理時間が長くなるという
欠点がある。
[Problem to be solved by the invention] The conventional memory management method described above sequentially allocates memory blocks in the memory space in order to improve memory efficiency, and various types of memory blocks are allocated in a mixed manner. When deleting all memory blocks, it is necessary to deallocate each memory block one by one while tracing the chain between memory blocks, and it is necessary to perform garbage collection while being aware of the continuity of the deallocated memory blocks. Yes, and when allocating a new memory block, if there is a memory block that was previously deallocated, check to see if there is an area where it is possible to allocate the memory block without allocating it while tracing the chain between the freed memory blocks. , when there is no available area for allocation, it is allocated to unused memory, which has the disadvantage of increasing processing time.

[課題を解決するための手段] 本発明のメモリ管理方法は、メモリ空間をページ単位に
分割し、1つのページ内に同一サイズ・同一構造のメモ
リブロックのみを割付ける。
[Means for Solving the Problems] The memory management method of the present invention divides the memory space into pages, and allocates only memory blocks of the same size and structure within one page.

[作用] ページ単位に分割されたメモリ空間に、同一種類のメモ
リブロックのみが割付けられているので、ある種類のメ
モリブロック全部を削除するときにメモリブロック間の
チェーンをたどりなから各メモリブロックを1つ1つデ
アロケートする必要がなく、メモリブロックがデアロケ
ートされたときに、ガベージコレクションの必要かなく
、また、新しくメモリブロックをアロケートするとき、
解放されたメモリブロック間のチェーンをたとりなから
アロケートする必要がないので処理時間か短縮される。
[Effect] Only memory blocks of the same type are allocated to the memory space divided into pages, so when deleting all memory blocks of a certain type, each memory block is deleted without tracing the chain between memory blocks. There is no need to deallocate each memory block one by one, there is no need for garbage collection when memory blocks are deallocated, and when new memory blocks are allocated,
Since there is no need to allocate a chain between freed memory blocks from scratch, processing time is shortened.

[実施例1 次に、本発明の実施例について図面を参照して説明する
[Example 1 Next, an example of the present invention will be described with reference to the drawings.

第1図は本発明のメモリ管理方法の一実施例のブロック
図、第2図は第1図のページ管理ブロック1とメモリブ
ロック管理ブロック2に格納された各情報とメモリの各
ページ41.42.43に割付けられたメモリブロック
A1〜Aa、 B+、 B2との関係を示す図である。
FIG. 1 is a block diagram of an embodiment of the memory management method of the present invention, and FIG. 2 shows each information stored in the page management block 1 and memory block management block 2 of FIG. 1 and each page 41, 42 of the memory. .43 is a diagram showing the relationship between memory blocks A1 to Aa, B+, and B2 allocated to memory blocks A1 to Aa, B+, and B2.

なお、第1図、第2図中「囚」は空エリア、「二」はデ
アロケートされたエリアを示す。
In FIGS. 1 and 2, "Prison" indicates an empty area, and "Second" indicates a deallocated area.

ページ管理ブロック1には同一種類(大きさ、構造が同
じである)のメモリブロックA1〜A6またはB、、 
B2か割付けられたページ41.42.43の各ページ
単位の管理情報か格納される。メモリブ0ツク管理ブロ
ツク2には各ページ41.42.43内に割付けられた
メモリブロックA1〜As、 B1. B2の各ブロッ
ク単位の管理情報が格納され、また、メモリブロックA
1〜As、 Bl、 B2がデアロケートされたときの
空きメモリブロック情報が格納される。
Page management block 1 includes memory blocks A1 to A6 or B of the same type (same size and structure),
Management information for each page of B2 or allocated pages 41, 42, and 43 is stored. The memory block management block 2 includes memory blocks A1 to As, B1 . Management information for each block of B2 is stored, and memory block A
Free memory block information when 1 to As, Bl, and B2 are deallocated is stored.

空きページ管理ブロック3には、不要となったページ4
1,42.43の再利用のために、同一種類のメモリブ
ロックA1〜A6またはBl、B2のすべてがデアロケ
ートされたときの空きページ情報か格納される。
Free page management block 3 contains pages 4 that are no longer needed.
In order to reuse memory blocks A1 to A6 or B1 and B2 of the same type, free page information is stored when all of the same type of memory blocks A1 to A6 or B1 and B2 are deallocated.

第1図、第2図には例として先頭ページポインタ11.
最終ページポインタ12.先頭メモリブロックポインタ
21.最終メモリブロックポインタ22その他のポイン
タおよび空きメモリブロックチェーン23.空きページ
チェーン31が示されている。また、メモリブロックA
1〜A6およびBl、 B2におけるサフィックスはそ
れぞれそのメモリブロックがアロケートされた順序を示
している。
In FIGS. 1 and 2, a first page pointer 11.
Last page pointer 12. First memory block pointer 21. Last memory block pointer 22 Other pointers and free memory block chain 23. A free page chain 31 is shown. Also, memory block A
The suffixes in B1 to A6 and B1 and B2 respectively indicate the order in which the memory blocks were allocated.

新しくメモリブロックをアロケートする場合、第2図に
示すように、メモリブロック管理ブロック2に同一種類
のメモリブロックの空きメモリブロックチェーン23か
あるのてページ41の空きメモリブロックA2を再利用
してメモリブロックを割付ける。このとき同一種類のメ
モリブロックA、〜A6およびB、、 B2ごとに割付
はページが分けられているので、空きメモリブロックを
サーチする必要がなく、最初の空きメモリブロックA2
を再利用することかできる。空きメモリブロックA2ま
たはA5がない場合には、ページ42内の未使用域にメ
モリブロックを割付け、ページ42の未使用域にメモリ
ブロックを割付けるエリアがないときは、第1図に示す
ように、空きページ管理ブロック3の空きページチェー
ン31があれば最初の空きページ44に、ページ44と
45に空きエリアかなければ新たにメモリを1ページ確
保し、その確保されたページ(不図示)に新しいメモリ
ブロックを割付ける。
When allocating a new memory block, as shown in FIG. 2, there is a free memory block chain 23 of the same type of memory block in the memory block management block 2, so the free memory block A2 of page 41 is reused to allocate memory. Allocate blocks. At this time, since pages are allocated for each of the same type of memory blocks A, ~A6 and B, , B2, there is no need to search for free memory blocks, and the first free memory block A2
can be reused. If there is no free memory block A2 or A5, a memory block is allocated to an unused area in page 42, and if there is no area to allocate a memory block to an unused area of page 42, as shown in FIG. If there is a free page chain 31 of the free page management block 3, the first free page 44 is allocated, and if there is no free area on pages 44 and 45, one new page of memory is allocated, and the allocated page (not shown) is allocated. Allocate a new memory block.

1つのメモリブロックA1〜A6. B1. B2をデ
アロケートする場合、メモリブロックA1〜As  B
I  B2間のチェーンから削除し、空きメモリブロッ
クのチェーンに追加する。デアロケートされたメモリブ
ロックA1〜A6. B+、 B2を含むページ41.
42,43には、同一種類のメモリブロックしか割付け
られナイノでガベージコレクションは不要である。
One memory block A1-A6. B1. When deallocating B2, memory blocks A1 to As B
Delete it from the chain between I and B2 and add it to the chain of free memory blocks. Deallocated memory blocks A1-A6. Page 41 including B+ and B2.
Since only memory blocks of the same type are allocated to 42 and 43, garbage collection is not necessary.

同一種類のすべてのメモリブロックA、〜八。またはB
l、 B2をデアロケートする場合、空きページ管理ブ
ロック3の空きページチェーン31にデアロケーション
対策のメモリブロックを含むページ41〜45すべてを
つなぎ、対応するページ管理プロ、ンク1を初期化する
たけで終了し、各メモリブロックA1〜A6. B1.
 B2ごとに処理する必要はない。
All memory blocks A, ~8 of the same type. or B
When dealinglocating B2, all the pages 41 to 45 including memory blocks for deallocation are connected to the free page chain 31 of the free page management block 3, and the corresponding page management program Nk1 is initialized. and each memory block A1 to A6 . B1.
There is no need to process each B2.

以上述べたように、メモリ空間をページ41.42また
は43のページ単位に分割して管理を行ない、1つのペ
ージ内には同一種類のメモリブロックA1〜A6または
B、、 92シか割当てないので、メモリ管理処理が高
速化される。
As mentioned above, the memory space is managed by dividing it into pages 41, 42 or 43, and only 92 memory blocks of the same type, A1 to A6 or B, are allocated to one page. , memory management processing is sped up.

[発明の効果] 以上説明したように本発明は、メモリ空間をページ単位
に分割して管理し、1つのページ内に同一サイズ・同一
構造のメモリブロックのみを割当てることにより、メモ
リ空間に各種メモリブロックか混在していないので、メ
モリブロックを削除する際、チェーンをたどりながら1
つ1つデアロケートする必要かなく、また、デアロケー
トされたメモリブロックが連続しているときのガベージ
コレクションの必要がなく、新しくメモリブロックをア
ロケートするときも、空きメモリブロック間のチェーン
をたどりながら割付けるべきエリアを調へる必要もない
ので、メモリ管理処理の著しい高速化が実現できる効果
がある。
[Effects of the Invention] As explained above, the present invention manages memory space by dividing it into pages, and allocates only memory blocks of the same size and structure within one page. Since blocks are not mixed, when deleting a memory block, one
There is no need to deallocate each memory block one by one, and there is no need to perform garbage collection when deallocated memory blocks are consecutive, and when allocating a new memory block, it is allocated while following the chain between free memory blocks. Since there is no need to check the target area, there is an effect that the speed of memory management processing can be significantly increased.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明のメモリ管理方法の一実施例のブロック
図、第2図は第1図のページ管理ブロック1とメモリブ
ロック管理ブロック2に格納された各情報とメモリの各
ページ41.42.43に割付けられたメモリブロック
A1〜Aa、 B1. B2との関係を示す図である。 l・・・・ページ管理ブロック、 2・・・・メモリブロック管理ブロック、3・・・・空
きページ管理ブロック、 11・・・・先頭ページポインタ、 12・・・・最終ページポインタ、 21・・・・先頭メモリブロックポインタ、22・・・
・最終メモリブロックポインタ、23・・・・空きメモ
リブロックチェーン、31・・・・空きページチェーン
、 4]、 42.43.44,45・・・・・・・・ペー
ジ、A1. A2. A3. A4. As、 A6・
・・・メモリブロック、B1. B2・・・・・・・・
・・・・・・・・・・・・メモリブロック。
FIG. 1 is a block diagram of an embodiment of the memory management method of the present invention, and FIG. 2 shows each information stored in the page management block 1 and memory block management block 2 of FIG. 1 and each page 41, 42 of the memory. .43 allocated memory blocks A1 to Aa, B1. It is a figure which shows the relationship with B2. l...Page management block, 2...Memory block management block, 3...Empty page management block, 11...First page pointer, 12...Last page pointer, 21... ...Start memory block pointer, 22...
- Final memory block pointer, 23... Free memory block chain, 31... Free page chain, 4], 42.43.44,45... Page, A1. A2. A3. A4. As, A6・
...Memory block, B1. B2・・・・・・・・・
・・・・・・・・・・・・Memory block.

Claims (1)

【特許請求の範囲】 1、メモリ空間に新たにメモリブロックをアロケートす
るとき、デアロケートされたメモリブロックがあれば該
メモリブロックを再利用し、デアロケートされたメモリ
ブロックがなければ新しくメモリを動的に切出してメモ
リブロックを割付け、不要となったメモリブロックをデ
アロケートして再利用するメモリ管理方法において、 前記メモリ空間をページ単位に分割し、1つのページ内
に同一サイズ・同一構造のメモリブロックのみを割付け
ることを特徴とするメモリ管理方法。
[Claims] 1. When allocating a new memory block in the memory space, if there is a deallocated memory block, the memory block is reused, and if there is no deallocated memory block, a new memory is dynamically allocated. In a memory management method that allocates memory blocks by allocating memory blocks and then deallocates and reuses unnecessary memory blocks, the memory space is divided into pages, and only memory blocks of the same size and structure are allocated within one page. A memory management method characterized by allocation.
JP16982888A 1988-07-06 1988-07-06 Memory control method Pending JPH0218637A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16982888A JPH0218637A (en) 1988-07-06 1988-07-06 Memory control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16982888A JPH0218637A (en) 1988-07-06 1988-07-06 Memory control method

Publications (1)

Publication Number Publication Date
JPH0218637A true JPH0218637A (en) 1990-01-22

Family

ID=15893664

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16982888A Pending JPH0218637A (en) 1988-07-06 1988-07-06 Memory control method

Country Status (1)

Country Link
JP (1) JPH0218637A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006039878A (en) * 2004-07-26 2006-02-09 Aplix Corp Memory management method and memory management program in java (r) execution environment
JP2008070928A (en) * 2006-09-12 2008-03-27 Fujitsu Fip Corp Numerical computation method and numerical computation program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006039878A (en) * 2004-07-26 2006-02-09 Aplix Corp Memory management method and memory management program in java (r) execution environment
JP4504756B2 (en) * 2004-07-26 2010-07-14 株式会社アプリックス Memory management method and memory management program in Java (registered trademark) execution environment
JP2008070928A (en) * 2006-09-12 2008-03-27 Fujitsu Fip Corp Numerical computation method and numerical computation program

Similar Documents

Publication Publication Date Title
US7136887B2 (en) Method and mechanism for finding references in a card in time linear in the size of the card in a garbage-collected heap
US7447851B2 (en) System for page-out and page-in of stale objects in memory
US20040167947A1 (en) Space-efficient, depth-first parallel copying collection technique making use of work-stealing on the same structures that maintain the stack of items to be scanned
JP2002506548A (en) Bounded pause garbage collection system having read and write barriers associated with a partially relocated object instance and garbage collection method thereof
JP2002506550A (en) Bounded pause garbage collection systems and methods including write barriers for source and destination instances of partially relocated objects
JP2002506549A (en) Bounded downtime garbage collection system and method including write barrier associated with source instance of partially relocated object
KR940007680A (en) How and to reduce memory allocation requirements
US20040199556A1 (en) Incremental scanning of enormous objects to improve scheduling and pause-time behavior of garbage collection
JPH04213129A (en) Memory control system and memory control method
US6219678B1 (en) System and method for maintaining an association for an object
US7096329B2 (en) Better placement of objects promoted into a generation managed by the train algorithm
JPH0218637A (en) Memory control method
US7039664B2 (en) Combining entries in a card object table
US20020124164A1 (en) Method for starting computer system
JPH0279138A (en) Memory area management system
US7146390B2 (en) Staging the processing of remembered-set entries as part of collection based on the train algorithm
JPH04219836A (en) Block control system
JPS62154149A (en) Control system for data area allocation of area shared file
JP2005050010A (en) Memory management method
JPH0713824A (en) Data management method
KR20000026038A (en) Method for block allocation of memory
US20040172428A1 (en) Numbering sequences of cars with the same number in a generation managed by the train algorithm
JPH0337748A (en) External storage accessing system utilizing main storage
JPH02193231A (en) File space free area management system
JPS6364146A (en) Logical space control system