JPH02156348A - Overflow area control method for plural hash tables - Google Patents

Overflow area control method for plural hash tables

Info

Publication number
JPH02156348A
JPH02156348A JP63310424A JP31042488A JPH02156348A JP H02156348 A JPH02156348 A JP H02156348A JP 63310424 A JP63310424 A JP 63310424A JP 31042488 A JP31042488 A JP 31042488A JP H02156348 A JPH02156348 A JP H02156348A
Authority
JP
Japan
Prior art keywords
memory
overflow area
overflow
symbol
registered
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
JP63310424A
Other languages
Japanese (ja)
Inventor
Ryuichi Matsukura
隆一 松倉
Tokuhiro Aritaka
有高 徳裕
Takeshi Kanai
剛 金井
Hiromi Hasegawa
長谷川 博己
Masatomo Yazaki
昌朋 矢崎
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 JP63310424A priority Critical patent/JPH02156348A/en
Publication of JPH02156348A publication Critical patent/JPH02156348A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To secure an enough overflow area by providing plural hash table areas and a memory pool to the used in common as the overflow areas of the respective plural hash areas in a memory. CONSTITUTION:In the memory, plural hash table areas 1, 2 and 3 and a memory pool 5, which is used in common as the overflow area of the respective plural hash tables, are provided. When a symbol is registered by a processing means 6 and if the overflow area is needed, the overflow area is secured from the memory pool 5 and registered. When the overflow area is deleted, it is deleted and when the overflow area becomes empty, the area is released. Thus, since a memory area is efficiently used, the comparatively enough overflow area can be secured.

Description

【発明の詳細な説明】 〔概 要〕 複数のハツシュ表のあふれ領域管理方法に関し、比較的
小規模のメモリ構成のコンピュータにおいて、複数のハ
ツシュ表を使用する場合、比較的十分なあふれ領域が確
保出来る、複数のハツシュ表のあふれ、領域管理方法の
提供を目的とし、メモリに、複数のハツシュ表“領域及
び、複数のハッシュ表夫々のあふれ領域として共通に使
用するメモリプールを確保し、処理手段にて、記号登録
時あふれ領域が必要になると該メモリプールよりあふれ
領域を確保して登録し、削除する時は削除し、該あふれ
領域が空になると解放するように構成する。
[Detailed Description of the Invention] [Summary] Regarding the overflow area management method for multiple hash tables, a relatively sufficient overflow area is secured when multiple hash tables are used in a computer with a relatively small memory configuration. In order to provide a method for managing the overflow area of multiple hash tables, a memory pool is secured in memory that is commonly used as an overflow area for multiple hash tables, and a processing means is provided. When an overflow area is needed during symbol registration, an overflow area is secured from the memory pool and registered, and when the symbol is to be deleted, it is deleted, and when the overflow area becomes empty, it is released.

〔産業上の利用分野〕[Industrial application field]

本発明は、例えば、複数の映画館の予約を行う、比較的
小規模のメモリ構成のコンピュータを用いる予約システ
ムで、映画館毎に予約者を登録したり削除したりする場
合、複数のハツシュ表を利用して予約者対応の記号を登
録、削除する場合等の、複数のハツシュ表のあふれ領域
管理方法に関する。
For example, the present invention is a reservation system that uses a computer with a relatively small memory configuration to make reservations for multiple movie theaters, and when registering or deleting a reservation person for each movie theater, multiple hash tables are used. This invention relates to a method for managing overflow areas in multiple hash tables, such as when registering and deleting symbols corresponding to reservation users using .

ハツシュ表とは、記号を表(ハツシュ表)に登録する場
合、探索が短時間で出来るようにする為に、記号Xに対
してn=1.2,3.  ・・・の整数になるようにハ
ツシュ関数をほどこし、n=f(X)を求め、第7図(
A)に示すハツシュ表のf (x)の列の1.2,3.
  ・・・の該当数字の行に登録するものである。
A hash table is a hash table in which when a symbol is registered in a table (hash table), n=1.2, 3. Apply a hash function so that it becomes an integer, find n=f(X), and calculate
1.2, 3 in the f(x) column of the hash table shown in A).
It is to be registered in the row with the corresponding number.

こうすると、記号Xを検索する時にハツシュ関数で計算
すれば、ハツシュ表の行の値が求まるので簡単に探索が
出来る。
In this way, when searching for the symbol X, by calculating with the hash function, the value of the row of the hash table can be found, making the search easy.

一般にハツシュ関数をどのように選んでも、記号x、y
に対しf (x) =f (y)と同じ値となり登録し
ようとしても衝突することがあり、このような場合は、
Xはハツシュ表に既に登録しであるので、yはあふれ領
域に登録し、ポインタにてリンクするようにしてyの探
索を容易にする。
In general, no matter how you choose the hash function, the symbols x, y
, the value is the same as f (x) = f (y), and there may be a conflict even if you try to register it. In such a case,
Since X has already been registered in the hash table, y is registered in the overflow area and linked with a pointer to facilitate the search for y.

又記号x、y、zに対しf (x) =f (y) =
f (z)となった場合は、y、zはあふれ領域に登録
し、yと2とは更にポインタにてリンクするようにして
2の探索を容易にする。
Also, for the symbols x, y, and z, f (x) = f (y) =
If f (z), y and z are registered in the overflow area, and y and 2 are further linked with a pointer to facilitate the search for 2.

近年マイクロプロセッサを使用したシステムは、他の制
約からメモリを十分持つことが出来ない場合もあり、こ
のような、比較的小規模のメモリ構成のコンピュータで
、複数のハツシュ表を利用して記号を登録、削除する場
合、メモリの効率的な利用が必要になってくる。
In recent years, systems using microprocessors may not have sufficient memory due to other constraints, so it is possible to use multiple hash tables to represent symbols on computers with relatively small memory configurations. When registering or deleting, it is necessary to use memory efficiently.

〔従来の技術〕[Conventional technology]

従来、複数のハツシュ表を利用する場合は、夫々のハツ
シュ表に対して、予め必要と思われる十分なあふれ領域
をメモリ上で確保していた。
Conventionally, when a plurality of hash tables are used, a sufficient overflow area deemed necessary for each hash table is secured in advance in memory.

この場合、あふれ領域の使用量にアンバランスが生ずる
こともあり、使用量の小さいあふれ領域に割当だメモリ
領域は無駄になってしまう。
In this case, an imbalance may occur in the usage of the overflow area, and the memory area allocated to the overflow area with a small usage amount is wasted.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

従来の方法では、無駄なメモリ領域を含み、十分大きい
メモリ領域が必要となり、比較的小規模のメモリ構成の
コンピュータでは、十分なあふれ領域が確保出来ない問
題点がある。
The conventional method includes a wasted memory area and requires a sufficiently large memory area, and there is a problem that a computer with a relatively small memory configuration cannot secure a sufficient overflow area.

本発明は、比較的小規模のメモリ構成のコンピュータに
おいて、複数のハツシュ表を使用する場合比較的十分な
あふれ領域が確保出来る、複数のハツシュ表のあふれ領
域管理方法の提供を目的としている。
SUMMARY OF THE INVENTION An object of the present invention is to provide a method for managing overflow areas of a plurality of hash tables, which can secure a relatively sufficient overflow area when a plurality of hash tables are used in a computer with a relatively small memory configuration.

〔課題を解決するための手段〕[Means to solve the problem]

第1図は本発明の原理ブロック図である。 FIG. 1 is a block diagram of the principle of the present invention.

第1図に示す如く、メモリに、複数のハツシュ表領域1
.2.3.  ・・及び、複数のハッシュ表夫々のあふ
れ領域として共通に使用するメモリプール5を確保し、
処理手段6にて、記号登録時あふれ領域が必要になると
該メモリプール5よりあふれ領域を確保して登録し、削
除する時は削除し、該あふれ領域が空になると解放する
ようにする。
As shown in Figure 1, there are multiple hash table areas 1 in memory.
.. 2.3. ...and secure a memory pool 5 that is commonly used as an overflow area for each of the multiple hash tables,
In the processing means 6, when an overflow area is required during symbol registration, an overflow area is secured from the memory pool 5 and registered, when the symbol is to be deleted, it is deleted, and when the overflow area becomes empty, it is released.

〔作 用〕[For production]

本発明によれば、予め各ハツシュ表に対してあふれ領域
を確保する従来の場合の、あふれ領域の合計よりも小さ
い領域の、各ハシシュ表夫々のあふれ領域として共通に
使用するメモリプール5をメモリ上に確保し、処理手段
6にて、記号登録時あふれ領域が必要になると該メモリ
プール5よりあふれ領域を確保して登録し、削除する時
は削除し、該あふれ領域が空になると解放するようにし
て、メモリ領域を効率的に使用するようにしているので
、比較的十分なあふれ領域が確保出来る。
According to the present invention, a memory pool 5 that is commonly used as an overflow area for each hashish table, which is smaller than the total overflow area in the conventional case where an overflow area is secured for each hashish table in advance, is used as a memory pool. When an overflow area is needed during symbol registration, the processing means 6 secures an overflow area from the memory pool 5 and registers it, deletes it when deleting it, and releases it when the overflow area becomes empty. In this way, the memory area is used efficiently, so a relatively sufficient overflow area can be secured.

〔実施例] 第2図は本発明の実施例のメモリの割当を示す図、第3
図は本発明の実施例の登録プログラムのフローチャート
、第4図は本発明の実施例の削除プログラムのフローチ
ャート、第5図は本発明の実施例の整理プログラムのフ
ローチャート、第6図は1例の本発明を適用するコンピ
ュータの構成を示す図、第7図は本発明の実施例のハツ
シュ表。
[Embodiment] FIG. 2 is a diagram showing memory allocation in an embodiment of the present invention, and FIG.
The figure is a flowchart of the registration program according to the embodiment of the present invention, FIG. A diagram showing the configuration of a computer to which the present invention is applied, and FIG. 7 is a hash table of an embodiment of the present invention.

メモリブロック、未使用リストを示す図、第8図は本発
明の実施例のメモリプールの管理表を示す図である。
FIG. 8 is a diagram showing a memory block and unused list, and FIG. 8 is a diagram showing a memory pool management table according to an embodiment of the present invention.

複数のハツシュ表を使用する、メモリが小規模なコンピ
ュータの構成を示すと第6図に示す如くで、例えば映画
館A、B、Cの映画館毎に予約者を登録したり削除した
りする場合等で、複数のハツシュ表を利用して予約者の
記号を登録、削除する場合、例えば、映画館A用の記号
を入力すると、マイクロプロセッサlOは、映画館A用
の記号に適用するハツシュ関数演算プログラムをROM
12より読み出し、演算し、演算結果によりメモリ11
の映画館A用のハツシュ表に登録したり削除したりする
The configuration of a computer with a small memory that uses multiple hash tables is shown in Figure 6. For example, reservations can be registered and deleted for each movie theater A, B, and C. When registering or deleting a reservation person's symbol using multiple hash tables, for example, if a symbol for movie theater A is input, the microprocessor IO selects the hash table to be applied to the symbol for movie theater A. Functional calculation program in ROM
12, perform the calculation, and store the calculation result in the memory 11.
Register or delete from the hash list for movie theater A.

このメモリll上でのハツシュ表及びメモリプールの割
当は第2図に示す如くで、複数のハツシュ表1.2,3
.  ・・及び、各ハツシュ表のあふれ領域として共通
に利用するメモリプール5を割当ておく。
The allocation of hash tables and memory pools on this memory 1 is as shown in Figure 2, and multiple hash tables 1, 2, 3
.. ...and a memory pool 5 that is commonly used as an overflow area for each hash table is allocated.

この場合のメモリプール5の大きさは従来のあふれ領域
の合計より小さいものであり、又あふれ領域が必要にな
った時あふれ領域として割り当てるメモリブロックは、
従来のあふれ領域よりは小さいものであり、メモリブー
ル5内には多数のメモリブロックを含んでいる。
The size of the memory pool 5 in this case is smaller than the total of the conventional overflow areas, and when an overflow area is required, the memory blocks to be allocated as the overflow area are:
It is smaller than the conventional overflow area, and the memory boolean 5 includes a large number of memory blocks.

ハツシュ表を示すと、第7図(A)に示す如くで、ハツ
シュ関数で求めた値のf (x)の列、記号(x)を登
録する列、記号に対する情報を示す列、あふれ領域とリ
ンクする為にあふれ領域のアドレスを書き込むあふれポ
インタの列よりなっている。
The hash table is shown in Figure 7 (A), with a column for the value f (x) obtained by the hash function, a column for registering the symbol (x), a column for indicating information about the symbol, and an overflow area. It consists of a series of overflow pointers that write addresses of overflow areas for linking.

又メモリブロックを示すと、第7図(B)に示す如くで
、記号(x)を登録する列、記号に対する情報を示す列
、メモリブロックの行のアドレスを書き込むあふれポイ
ンタの列よりなっており、各行をセルと呼ぶ。
The memory block is shown in Figure 7 (B) and consists of a column for registering the symbol (x), a column for indicating information about the symbol, and a column for overflow pointers for writing the address of the row of the memory block. , each row is called a cell.

尚メモリブロックはlセルの構成にして、削除すれば直
ちに解放出来るようにしてもよいが、メモリブロック獲
得の頻度が増加するので、通常はハツシュ表の10%程
度のセルを有するものとしている。
Note that the memory block may have a structure of 1 cell so that it can be released immediately upon deletion, but since this increases the frequency of memory block acquisition, it is usually configured to have about 10% of the cells in the hash table.

そこで、例えば、第7図に示す如く1個のハツシュ表に
対しメモリブロックを獲得した場合で、登録する記号A
Aのハツシュ関数の値が2であると、記号(x)の列の
2行目に登録し、登録する記号BBのハツシュ関数の値
が4であると、記号(x)の列の4行目に登録し、又登
録する記号CCのハツシュ関数の値が5であると、記号
(x)の列の5行目に登録する。
Therefore, for example, when a memory block is acquired for one hash table as shown in FIG. 7, the symbol A to be registered is
If the value of the hash function of A is 2, it will be registered in the 2nd row of the column of symbol (x), and if the value of the hash function of the symbol BB to be registered is 4, it will be registered in the 4th row of the column of symbol (x). If the value of the hash function of the symbol CC to be registered is 5, it is registered in the 5th row of the symbol (x) column.

次に、登録する記号EEのハツシュ関数の値が2となる
と、記号(X)の列の2行目には記号AAが登録してあ
り、衝突するので、この時は、メモリプール5よりあふ
れ領域としてメモリブロックNO,lを確保し、第7図
(B)に示すメモリブロックNo、1の記号(x)の列
の第1行に登録し、ハツシュ表の2行目のあふれポイン
タにメモリブロックN011の第1行目のアドレスを書
込みリンクさせる。
Next, when the value of the hash function of the symbol EE to be registered becomes 2, the symbol AA is registered in the second row of the symbol (X) column, and there is a collision, so at this time, the memory pool 5 overflows. Secure memory block No. 1 as an area, register it in the first row of the symbol (x) column of memory block No. 1 shown in FIG. The address of the first line of block N011 is written and linked.

次に、登録する記号DDのハツシュ関数の値が5となる
と、記号(X)の列の5行目には記号CCが登録してあ
り、衝突するので、第7図(B)に示すメモリブロック
No、1の記号(X)の列の第2行に登録し、ハツシュ
表の5行目のあふれポインタにメモリブロックNO61
の第2行目のアドレスを書込みリンクさせる。
Next, when the value of the hash function of the symbol DD to be registered becomes 5, the symbol CC is registered in the 5th row of the symbol (X) column, and there is a collision, so the memory shown in FIG. 7 (B) Register it in the second row of the symbol (X) column of block No. 1, and set the overflow pointer in the fifth row of the hash table to memory block No. 61.
Write the address on the second line to link.

次に、登録する記号FFのハツシュ関数の値が2となる
と、記号(X)の列の2行目には記号AAが登録してあ
り、又あふれポインタの列の2行目にはメモリブロック
N001−の1行目のアドレスが書き込んであるので、
この1行目をみるが、ここにも記号EEが書き込んであ
るので、メモリブロックN001の記号(x)の列の第
3行に登録し、第1行のあふれポインタにメモリブロッ
クNo、1の第3行目のアドレスを書込みリンクさせる
Next, when the value of the hash function of the symbol FF to be registered becomes 2, the symbol AA is registered in the second row of the symbol (X) column, and the memory block is registered in the second row of the overflow pointer column. Since the address of the first line of N001- is written,
Looking at this first line, the symbol EE is also written here, so it is registered in the third row of the symbol (x) column of memory block N001, and the overflow pointer in the first row is set to the memory block No. 1. Write the address on the third line to link.

又メモリブロックを獲得すると、メモリ上に、メモリブ
ロック毎に、第7図(C)に示す如き未使用セルのリス
トを作り、未使用リストへのポインタには未使用リスト
の第1行目のセルのアドレスを書込み、又未使用リスト
の各セルのあふれポインタには次のセルのアドレスを書
込み、次々とリンクさせておき、例えば、メモリブロッ
クの第1行目のセルに記号を占き込むと、未使用リスト
の第1行目のセルは取り除き、未使用リストへのポイン
タには第2行目のセルのアドレスを書込む。
When a memory block is acquired, a list of unused cells as shown in FIG. 7(C) is created for each memory block in the memory, and the pointer to the unused list is set to the first row of the unused list. Write the address of the cell, and write the address of the next cell to the overflow pointer of each cell in the unused list, linking them one after another, for example, placing a symbol in the cell in the first row of the memory block. Then, the cell in the first row of the unused list is removed, and the address of the cell in the second row is written in the pointer to the unused list.

又、メモリ上に、第8図に示す如きメモリプール管理表
を設け、メモリブロックのNOo及びメモリブロックの
先頭のアドレス及びメモリブロック内のセルの数を書き
込む領域を設けておく。
Further, a memory pool management table as shown in FIG. 8 is provided on the memory, and an area is provided for writing the NOo of the memory block, the start address of the memory block, and the number of cells in the memory block.

又第6図のROM12には、処理プログラムとして、第
3図〜第5図に示す登録プログラム、削除プログラム及
び整理プログラムを格納しておき、マイクロプロセッサ
10はこれを読み出し処理を行う。
The ROM 12 shown in FIG. 6 stores the registration program, deletion program, and organization program shown in FIGS. 3 to 5 as processing programs, and the microprocessor 10 reads these programs and processes them.

次に、記号登録について、第3図の登録プログラムに従
って説明する。
Next, symbol registration will be explained according to the registration program shown in FIG.

ステップ1にて、記号のハツシュ関数を計算し、ステッ
プ2にて、ハツシュ表の計算結果の行に記号が登録され
ているかを見、登録されていなければ、ステップ3にて
ハツシュ表に登録する。
In step 1, calculate the hash function of the symbol, in step 2 check whether the symbol is registered in the calculation result row of the hash table, and if it is not registered, register it in the hash table in step 3. .

登録されていると、ステップ4にて、第7図(C)の未
使用リストへのポインタにアドレスが書き込まれている
かを見、書き込まれていなければ、ステップ5にてメモ
リプール5からメモリブロックを獲得し、ステップ6に
て、メモリブロックの各セルを第7図(C)に示す如く
、未使用リストへのポインタ及び未使用セルのリストに
てリンクさせ又ステップ7にて第8図のメモリプール管
理表に獲得したメモリブロックのアドレス及びセルの数
を登録してステップ8に進む。
If it is registered, it is checked in step 4 whether the address has been written to the pointer to the unused list shown in FIG. In step 6, each cell of the memory block is linked with a pointer to the unused list and the list of unused cells, as shown in FIG. 7(C), and in step 7, as shown in FIG. The address of the acquired memory block and the number of cells are registered in the memory pool management table, and the process proceeds to step 8.

ステップ8では、第7図(C)の未使用リストへのポイ
ンタのアドレスにより未使用セルを獲得し、ステップ9
にて、獲得したメモリブロックの未使用セルに内容を登
録し、上位のハツシュ表又はセルのあふれポインタに登
録したセルのアドレスを書込みリンクさせる。
In step 8, an unused cell is acquired by the address of the pointer to the unused list in FIG. 7(C), and in step 9
Then, the content is registered in an unused cell of the acquired memory block, and the address of the registered cell is written and linked to the upper hash table or cell overflow pointer.

次に、記号削除について第4図の削除プログラムに従っ
て説明する。
Next, symbol deletion will be explained according to the deletion program shown in FIG.

ステップ1にて、削除する記号のハツシュ関数を計算し
、ハツシュ表の行の値を求める。
In step 1, the hash function of the symbol to be deleted is calculated, and the row value of the hash table is determined.

■削除する記号がハツシュ表中の該当行に有り、該行の
あふれポインタにはセルのアドレスが書き込まれていな
い時は、ステップ2にて内容を削除する。
(2) If the symbol to be deleted is in the corresponding row of the hash table and no cell address is written in the overflow pointer of the row, the contents are deleted in step 2.

■削除する記号がハツシュ表中の該当行に有り、該行の
あふれポインタにはセルのアドレスが書き込まれている
場合は、ステップ3にてあふれポインタにて最初にリン
クしているセルの内容を上書きして削除し、ステップ4
にて、第8図のメモリプール管理表の、削除したセルの
メモリブロックNo、のセルの使用数を1減じステップ
5に進む。
■If the symbol to be deleted is in the corresponding row of the hash table and the address of the cell is written in the overflow pointer of the row, in step 3, the contents of the cell first linked with the overflow pointer are Overwrite and delete, step 4
Then, in the memory pool management table of FIG. 8, the number of used cells in the memory block number of the deleted cell is decreased by 1, and the process proceeds to step 5.

ステップ5ではセルの使用数の残りが使用数の約30%
程度以下でなければ終了し、以下になればメモリブロッ
クを次に説明する整理プログラムにて整理する。
In step 5, the remaining number of cells used is approximately 30% of the number used.
If it is below this level, the process ends, and if it is below this level, the memory block is organized using the organizing program described below.

■記号がメモリブロックにある場合は、ステップ7にて
メモリブロックのあふれポインタに、次のセルのアドレ
スが書き込まれているかを見、書き込まれていればステ
ン1プ8に進み、次のリンクのセルの内容を前のセルに
上書きして削除しステップ10に進む。
■If the symbol is in the memory block, check whether the address of the next cell has been written to the overflow pointer of the memory block in step 7, and if it has been written, proceed to step 1 8 and start the next link. The contents of the cell are deleted by overwriting the previous cell, and the process proceeds to step 10.

ステップ7にて次のセルが書き込まれていなければ、ス
テップ9にてセルの内容を削除しステップ10に進む。
If the next cell has not been written in step 7, the contents of the cell are deleted in step 9 and the process proceeds to step 10.

ステップ10では、メモリプール管理表の、削除したセ
ルのメモリブロックNO,の使用数を1減ずし、ステッ
プ11に進む。
In step 10, the number of used memory blocks of the deleted cell in the memory pool management table is decreased by 1, and the process proceeds to step 11.

ステップ11にて、セルの使用数の残りが使用数の約3
0%程度以下でなければ終了し、以下になればメモリブ
ロックを次に説明する整理プログラムにて整理する。
In step 11, the remaining number of cells used is approximately 3 of the number used.
If it is not less than about 0%, the process ends, and if it is less than 0%, the memory block is sorted by the sorting program described below.

次に、メモリブロックの整理につき第5図のメモリブロ
ックの整理プログラムに従って説明する。
Next, the arrangement of memory blocks will be explained according to the memory block arrangement program shown in FIG.

ステップ1にて、複数のハツシュ表中のあふれポインタ
を探索してステップ2に進む。
In step 1, overflow pointers in a plurality of hash tables are searched and the process proceeds to step 2.

ステップ2にて、リンク先のセルが整理メモリブロック
である時は、複数のメモリブロックの未使用リストから
未使用のセルを獲得しこれに内容をコピーし、リンクし
ている上位のハツシュ表又はセルのあふれ領域のアドレ
スを、コピーした未使用リストのセルのアドレスとし、
ステップ3にてメモリプール管理表の整理したセルの該
当メモリブロツタの使用数を1:$iじステップ4に進
む動作を、複数のハツシュ表の終わり迄繰り返し、ステ
ップ5に進む。
In step 2, if the linked cell is a sorted memory block, acquire an unused cell from the unused list of multiple memory blocks, copy the contents to it, and Set the address of the cell overflow area to the address of the copied unused list cell,
In step 3, the number of uses of the corresponding memory blotter of the organized cell in the memory pool management table is set to 1:$i.The operation of proceeding to step 4 is repeated until the end of a plurality of hash tables, and the process proceeds to step 5.

ステップ5にて、使用数が0になれば、ステップ6にて
該整理メモリブロックを解放して再度使用出来るように
する。
If the used number becomes 0 in step 5, the organized memory block is released in step 6 so that it can be used again.

ステップ5にて、使用数がOにならなければステップ7
に進み、複数のメモリブロックの未使用リストをたどり
ブロックNO,を検索し、ステップ8にて、ブロックN
O9が整理メモリブロックならば1つ前のセルのあふれ
ポインタを次のセルのアドレスとし、ステップ9にてメ
モリプール管理表の該当ブロックNO1の使用数を1減
じステップ10に進む、ステップ7からステップlO迄
の動作を、未使用リストの終わり迄繰り返す。
If the number of uses does not reach O in step 5, step 7
Step 8 searches the unused list of multiple memory blocks for block No. 8, and searches for block No.
If O9 is a sorted memory block, use the overflow pointer of the previous cell as the address of the next cell, reduce the number of used blocks in the corresponding block No. 1 in the memory pool management table by 1 in step 9, and proceed to step 10. Steps from step 7 The operations up to IO are repeated until the end of the unused list.

すると整理メモリブロックは空になるので、ステップI
Iにて整理メモリブロックを解放して再度使用出来るよ
うにする。
Then the organized memory block will be empty, so step I
I releases the organized memory block so that it can be used again.

このようにして、メモリプールのあふれ領域としてのメ
モリブロックを動的に割当てメモリの使用効率を高めて
いるので、比較的十分なあふれ領域が確保出来る。
In this way, a memory block as an overflow area of the memory pool is dynamically allocated to improve memory usage efficiency, so a relatively sufficient overflow area can be secured.

尚コンピュータのO3としてlTR0N仕様にもとづく
ものを使用すれば、タスクがメモリブロックを獲得する
には例えばシステムコールget−blkを使用し、解
放する時はtel−blkを使用するようにすれば、メ
モリブロックの獲得解放が容易に出来る。
Note that if you use a computer O3 based on the lTR0N specifications, a task can acquire a memory block by using the system call get-blk, and release it by using tel-blk. Blocks can be acquired and released easily.

〔発明の効果〕〔Effect of the invention〕

以上詳細に説明せる如く本発明によれば、あふれ領域を
割り当てるのに、複数のハツシュ表が共通にあふれ領域
として使用するメモリプールを設け、メモリプールのあ
ふれ領域としてのメモリブロックを動的に割当てメモリ
の使用効率を高めているので、比較的小規模のメモリ構
成のコンピュータで、複数のハツシュ表を利用して記号
を登録、削除する場合、比較的十分なあふれ領域が確保
出来る効果がある。
As explained in detail above, according to the present invention, in order to allocate an overflow area, a memory pool that is commonly used as an overflow area by a plurality of hash tables is provided, and a memory block is dynamically allocated as the overflow area of the memory pool. Since memory usage efficiency is improved, a relatively sufficient overflow area can be secured when symbols are registered or deleted using multiple hash tables on a computer with a relatively small memory configuration.

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

第1図は本発明の原理ブロック図、 第2図は本発明の実施例のメモリの割当を示す図、第3
図は本発明の実施例の登録プログラムのフローチャート
、 第4図は本発明の実施例の削除プログラムのフローチャ
ート、 第5図は本発明の実施例の整理プログラムのフローチャ
ート、 第6図は1例の本発明を適用するコンピュータの構成を
示す図、 第7図は本発明の実施例のハンシュ表、メモリブロック
、未使用リストを示す図、 第8図は本発明の実施例のメモリプールの管理表を示す
図である。 図において、 1.2.3はハツシュ表、 5はメモリプール、 6は処理手段、 10はマイクロプロセッサ、 11はメモリ、 12はROM。 I3は記号入力部を示す。 禾斃明の原理プロ・ンクロ 第 図 本尭8月/)火施イダ・1のメモリの富1当てを汀、寸
図第 1イグ・v本系明8通、出するコシピユータの構成ヒホ
す図第 乙 図 メモリアールの電は1表 をホす図 第 図
Figure 1 is a block diagram of the principle of the present invention, Figure 2 is a diagram showing memory allocation in an embodiment of the present invention, and Figure 3 is a diagram showing memory allocation in an embodiment of the present invention.
Figure 4 is a flowchart of a registration program according to an embodiment of the present invention, Figure 4 is a flowchart of a deletion program according to an embodiment of this invention, Figure 5 is a flowchart of a sorting program according to an embodiment of this invention, and Figure 6 is an example of an example. FIG. 7 is a diagram showing the configuration of a computer to which the present invention is applied. FIG. 7 is a diagram showing the Hunsch table, memory block, and unused list according to the embodiment of the present invention. FIG. 8 is a memory pool management table according to the embodiment of the present invention. FIG. In the figure, 1.2.3 is a hash table, 5 is a memory pool, 6 is a processing means, 10 is a microprocessor, 11 is a memory, and 12 is a ROM. I3 indicates a symbol input section. The principle of destruction is the composition of the coscipiputer that will be published. Figure 1.Memorial phone number is 1 table.Figure 1.

Claims (1)

【特許請求の範囲】 比較的小規模のメモリ構成のコンピュータで、複数のハ
ッシュ表を利用して記号を登録、削除するに際し、 メモリに、複数のハッシュ表領域(1、2、3、・・)
及び、複数のハッシュ表夫々のあふれ領域として共通に
使用するメモリプール(5)を確保し、処理手段(6)
にて、記号登録時あふれ領域が必要になると該メモリプ
ール(5)よりあふれ領域を確保して登録し、削除する
時は削除し、該あふれ領域が空になると解放するように
したことを特徴とする複数のハッシュ表のあふれ領域管
理方法。
[Claims] When registering and deleting symbols using a plurality of hash tables in a computer with a relatively small memory configuration, a plurality of hash table areas (1, 2, 3, etc.) are stored in the memory. )
A memory pool (5) commonly used as an overflow area for each of the plurality of hash tables is secured, and a processing means (6) is secured.
, when an overflow area is needed when registering a symbol, the overflow area is secured from the memory pool (5) and registered, the overflow area is deleted when the symbol is deleted, and the overflow area is released when the overflow area becomes empty. A method for managing overflow space for multiple hash tables.
JP63310424A 1988-12-08 1988-12-08 Overflow area control method for plural hash tables Pending JPH02156348A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63310424A JPH02156348A (en) 1988-12-08 1988-12-08 Overflow area control method for plural hash tables

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63310424A JPH02156348A (en) 1988-12-08 1988-12-08 Overflow area control method for plural hash tables

Publications (1)

Publication Number Publication Date
JPH02156348A true JPH02156348A (en) 1990-06-15

Family

ID=18005091

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63310424A Pending JPH02156348A (en) 1988-12-08 1988-12-08 Overflow area control method for plural hash tables

Country Status (1)

Country Link
JP (1) JPH02156348A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0528079A (en) * 1991-07-24 1993-02-05 Fujitsu Ltd Memory management device for communication system
JPH0535844A (en) * 1991-07-30 1993-02-12 Matsushita Graphic Commun Syst Inc Electronic filing device
JPH0619724A (en) * 1992-07-02 1994-01-28 Nec Corp Job account storing system
JP2008176465A (en) * 2007-01-17 2008-07-31 Ricoh Co Ltd Log information management method and information equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0528079A (en) * 1991-07-24 1993-02-05 Fujitsu Ltd Memory management device for communication system
JPH0535844A (en) * 1991-07-30 1993-02-12 Matsushita Graphic Commun Syst Inc Electronic filing device
JPH0619724A (en) * 1992-07-02 1994-01-28 Nec Corp Job account storing system
JP2008176465A (en) * 2007-01-17 2008-07-31 Ricoh Co Ltd Log information management method and information equipment

Similar Documents

Publication Publication Date Title
CN1026631C (en) Method of concurrency access for useing indexed tree to data base record
JPH07175698A (en) File system
US7058656B2 (en) System and method of using extensions in a data structure without interfering with applications unaware of the extensions
JPH02156348A (en) Overflow area control method for plural hash tables
JP3030030B2 (en) Area management processing method
JPH0267651A (en) Method for controlling protection of file system
JP2010061604A (en) Consistency verification system, verification method, and program
JPS62287350A (en) Index integrally updating system
JPH0293961A (en) File deleting system
JPH0337748A (en) External storage accessing system utilizing main storage
JPS61245251A (en) File control method
JPS58175188A (en) Memory managing system
JPS62160545A (en) System for managing unused area of direct access storage device
JPH04223537A (en) Image file storing system
JPH06231152A (en) Method for processing business slip
JPH1165903A (en) Method and device for data base management, and storage medium stored with data base management program
JPH02193231A (en) File space free area management system
JPH04235644A (en) File storage system
JPS63167942A (en) File control system
JPH03268146A (en) Fast file access system
JPH0367341A (en) Variable record control system
JPS6143372A (en) Document processing system
JPH07200179A (en) Division control system for volume
JPH02138645A (en) Processing system for input order file
JPH04114243A (en) File managing method for filing device