JPH05165703A - Saving memory allocation method - Google Patents

Saving memory allocation method

Info

Publication number
JPH05165703A
JPH05165703A JP3327902A JP32790291A JPH05165703A JP H05165703 A JPH05165703 A JP H05165703A JP 3327902 A JP3327902 A JP 3327902A JP 32790291 A JP32790291 A JP 32790291A JP H05165703 A JPH05165703 A JP H05165703A
Authority
JP
Japan
Prior art keywords
blocks
block
search
request
memory
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
JP3327902A
Other languages
Japanese (ja)
Inventor
Satoru Nakachi
悟 仲地
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 Corp
Original Assignee
NEC Corp
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 Corp filed Critical NEC Corp
Priority to JP3327902A priority Critical patent/JPH05165703A/en
Publication of JPH05165703A publication Critical patent/JPH05165703A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain a saving memory allocation method for reducing an error processing. CONSTITUTION:In a step S1, a memory security request is given, and the request on one block or more than two blocks in the memory security request is judged in S2. When the number of the request blocks is a piece of YES, an idle block for upper direction is searched in S3. When the number of the request blocks is more than two NO, the idle block in a lower direction is searched in S4. Then, the existence of the idle blocks continuing for the number of the request blocks is judged in S5. In the case of YES, in which the continuous idle blocks for the number of the request blocks exist, the processing of management TBL registration is executed in S6. In S7, the error processing is executed in the case of No, in which the continuous idle blocks for the number of the request blocks does not exist.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、コンピュータ、ワード
プロセッサのウィンドウ処理および/またはマルチグラ
フ処理に利用し、画面イメージをメモリ上に割り当てを
行って退避する退避メモリ割り当て方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a save memory allocation method which is used for window processing and / or multigraph processing of a computer or a word processor and allocates a screen image on a memory and saves it.

【0002】[0002]

【従来の技術】従来、コンピュータ、ワードプロセッサ
等の情報処理におけるウィンドウ処理あるいはマルチグ
ラフ処理では、プログラムの画面イメージ(ビットイメ
ージ)をメモリ上に退避して、メモリ上からCRT上に
復帰する処理を行い、画面切り換えを行っている。
2. Description of the Related Art Conventionally, in window processing or multigraph processing in information processing of computers, word processors, etc., processing for saving a screen image (bit image) of a program on a memory and restoring it from the memory to a CRT is performed. , The screen is being switched.

【0003】図3は、この画面切り換えの状態を示して
いる。
FIG. 3 shows this screen switching state.

【0004】図3において、退避処理〔13〕では、第
1プログラムの画面イメージを退避メモリ上のブロック
1に退避を行う。次に、復帰処理〔14〕では、第2の
プログラムの画面イメージを退避目上のブロック2から
CRT上に復帰を行って、プログラムの画面切り換え処
理を行う。この場合、複数のプログラムの画面イメージ
を退避するために退避メモリの確保および割り当てを管
理する必要がある。この退避メモリは、ある固定長の大
きさを1個のブロックと、それぞれのプログラムが連続
したブロックの必要個数によって、単一方向からの空き
ブロックサーチを行い退避メモリの割り当て処理を行
う。
In FIG. 3, in the save processing [13], the screen image of the first program is saved in the block 1 on the save memory. Next, in the restoration process [14], the screen image of the second program is restored from the block 2 on the save screen to the CRT, and the screen switching process of the program is performed. In this case, it is necessary to manage the allocation and allocation of the save memory to save the screen images of a plurality of programs. In this save memory, one block having a certain fixed length and a required number of blocks in which each program is continuous perform a free block search from a single direction to perform save memory allocation processing.

【0005】図3では、ブロック1に第1プログラムの
画面イメージ、ブロック2に第2プログラムの画面イメ
ージ、ブロック3、ブロック4に第3プログラムの画面
イメージを退避するように割り当てられる。
In FIG. 3, the screen image of the first program is assigned to block 1, the screen image of the second program is assigned to block 2, and the screen image of the third program is assigned to blocks 3 and 4.

【0006】図4は、この退避メモリの割り当ての処理
手順を示している。
FIG. 4 shows a processing procedure for allocating the save memory.

【0007】図4において、連続したブロックの必要個
数に合わせてメモリ確保要求を行う(ステップ(以下の
図中、Sと記載する)15)。続いて、要求された個数
の連続した空きブロックが存在するかを調べるために単
一方向からの空きブロックサーチを行う(ステップ1
6)。さらに要求を満たす空きブロックの有無を判断す
る(ステップ17)。ここで、空きブロックが有るYe
sの場合は、要求を行ったプログラムに対し、サーチし
た空きブロックを割り当てるように管理テーブル(TB
L)登録の処理を行う(ステップ18)。また、ステッ
プ17で、要求を満たす空ブロックが存在しないNoの
場合は、エラー処理を行う(ステップ19)。
In FIG. 4, a memory reservation request is made in accordance with the required number of consecutive blocks (step (described as S in the following figure) 15). Then, a free block search from a single direction is performed to check whether the requested number of consecutive free blocks exists (step 1).
6). Further, it is determined whether or not there is an empty block that satisfies the request (step 17). Here, Ye with an empty block
In the case of s, the management table (TB
L) A registration process is performed (step 18). If there is no empty block that satisfies the request in step 17, error processing is performed (step 19).

【0008】[0008]

【発明が解決しようとする課題】ところで、従来例の退
避メモリの割り当て方式では、図4に示すようにステッ
プ16にて、空きブロックの単一方向サーチを行ってい
るため、存在する空きブロックが連続せずに、エラー処
理(ステップ19)が頻繁に発生する欠点がある。例え
ば、図5に示すように、退避メモリの大きさが4ブロッ
ク分の場合、先ず、1ブロックサイズの第1プログラ
ム、2ブロックサイズの第2プログラム、1ブロックサ
イズの第3プログラムの順番に退避メモリを割り当てる
と、処理〔20〕の状態になる。次に、第1プログラム
と第3プログラムの開放を行うと、処理〔21〕の状態
になる。
By the way, in the conventional save memory allocation method, as shown in FIG. 4, the unidirectional search for empty blocks is performed in step 16, so that the existing empty blocks are There is a drawback that error processing (step 19) frequently occurs without being continuous. For example, as shown in FIG. 5, when the size of the save memory is four blocks, first, the first program of 1 block size, the second program of 2 block size, and the third program of 1 block size are saved in order. When the memory is allocated, the state of processing [20] is entered. Next, when the first program and the third program are released, the state of processing [21] is reached.

【0009】この状態に続いて、処理〔22〕の2ブロ
ックサイズの第4プログラムのメモリ確保要求が発生し
た場合、空きブロックが連続していないため、エラー処
理〔23〕が必要になる。
If a memory securing request for the fourth program having a 2-block size in the process [22] is issued following this state, the error process [23] is necessary because the empty blocks are not continuous.

【0010】本発明の目的は、このような課題を解決
し、従来、単一方向からの空きブロックサーチで頻繁に
発生していたエラー処理が低減できる退避メモリ割り当
て方法を提供することにある。
An object of the present invention is to solve the above problem and to provide a save memory allocation method capable of reducing the error processing that has been frequently generated in the conventional free block search from a single direction.

【0011】[0011]

【課題を解決するための手段】本発明の退避メモリ割り
当て方法は、メモリ確保要求の必要ブロック個数を判断
し、この要求ブロック個数によってメモリ割り当てを行
うブロックサーチの方向変更を行うことを特徴とするも
のである。
The save memory allocation method of the present invention is characterized in that the number of blocks required for a memory reservation request is determined, and the direction of block search for memory allocation is changed according to the number of requested blocks. It is a thing.

【0012】さらに、前記方法にあって、メモリ割り当
てを行うためのブロックサーチの方向変更は、要求ブロ
ック個数の判断によって、上方向サートと下方向サーチ
を行う双方向サーチであることを特徴とするものであ
る。
Further, in the above method, the direction change of the block search for allocating the memory is a bidirectional search in which the upward search and the downward search are performed depending on the number of requested blocks. It is a thing.

【0013】さらに前記それぞれの方法が、コンピュー
タあるいはワードプロセッサにおけるウィンドウ処理お
よび/またはマルチグラフ処理に適用されることを特徴
とするものである。
Further, each of the above methods is characterized by being applied to window processing and / or multigraph processing in a computer or a word processor.

【0014】[0014]

【実施例】以下、本発明の退避メモリ割り当て方法の実
施例について図面をもとに説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the save memory allocation method of the present invention will be described below with reference to the drawings.

【0015】図1は、双方向からの空きブロックサーチ
による退避メモリ割り当て処理手順を示している。
FIG. 1 shows a procedure for saving memory allocation by bidirectional free block search.

【0016】図1において、先ず、メモリ確保が要求さ
れる(ステップ1)。次に、このメモリ確保要求のブロ
ック個数が1個あるいは2個以上の要求か否かが判断さ
れる(ステップ2)。ここで、要求ブロック個数が1個
のYesの場合は、上方向サーチによる空きブロックサ
ーチを行う(ステップ3)。また、要求ブロック個数が
2個以上のNoの場合は、下方向サーチによる空きブロ
ックサーチを行う(ステップ4)。次に、ステップ3で
の上方向サーチ、ステップ4での下方向サーチによる空
きブロックサーチを行った結果、要求ブロック個数が連
続した空きブロックの存在が判断される(ステップ
5)。ここで、要求ブロック個数が連続する空ブロック
の存在であるYesの場合は、要求を行ったプログラム
の画面イメージを退避する位置として割り当てられた空
ブロックの開始アドレスと確保ブロック個数(メモリサ
イズ)等の情報を管理テーブル(TBL)に登録する
(ステップ6)。また、要求ブロック個数が連続した空
きブロックが存在しないNoの場合は、エラー処理を行
う(ステップ7)。
In FIG. 1, first, memory reservation is requested (step 1). Next, it is judged whether or not the number of blocks of this memory reservation request is one or two or more (step 2). If the number of requested blocks is one, Yes, an empty block search is performed by an upward search (step 3). If the number of requested blocks is 2 or more, the empty block search is performed by the downward search (step 4). Next, as a result of performing the upward search in step 3 and the empty block search by the downward search in step 4, it is determined that there are empty blocks in which the number of requested blocks is continuous (step 5). If the number of requested blocks is a continuous empty block, Yes, the start address of the empty block allocated as the position for saving the screen image of the program that made the request, the number of reserved blocks (memory size), etc. Information of the above is registered in the management table (TBL) (step 6). If the number of requested blocks is no empty block, the error processing is performed (step 7).

【0017】次に、具体的な動作例を従前の図5と対比
して説明する。
Next, a concrete operation example will be described in comparison with the conventional FIG.

【0018】図2に示すように、退避メモリの大きさは
図5と同様4ブロック分とする。
As shown in FIG. 2, the size of the save memory is 4 blocks as in FIG.

【0019】先ず、1ブロックサイズの第1プログラ
ム、2ブロックサイズの第2プログラム、1ブロックサ
イズの第3プログラムの順番に退避メモリを割り当てを
行う。
First, the save memory is allocated in the order of the 1-block size first program, the 2-block size second program, and the 1-block size third program.

【0020】第1プログラムと第3プログラムは、要求
ブロック個数が1個であり、図1中、ステップ3の上方
向サーチによる空きブロックサーチで退避メモリ上の空
きブロックが割り当てられる。また、第2プログラム
は、要求ブロック個数が2個であり、図1中、ステップ
4の下方向サーチによる空きブロックサーチで退避メモ
リ上の空きブロックが割り当てられる。
The first program and the third program each have a required number of blocks, and in FIG. 1, the empty block on the save memory is allocated by the empty block search by the upward search in step 3. Further, the second program has two requested blocks, and in FIG. 1, the empty block on the save memory is allocated by the empty block search by the downward search in step 4.

【0021】その結果、図2中、処理As a result, the process shown in FIG.

〔9〕のメモリ割
り当て状態となる。次に、第1プログラムと第3プログ
ラムの解放を行うと、処理〔10〕の状態になる。
The memory allocation state of [9] is entered. Next, when the first program and the third program are released, the state of processing [10] is reached.

【0022】この状態で、処理〔11〕の2ブロックサ
イズの第4プログラムのメモリ確保要求が発生した場
合、要求ブロック個数は2個であり、図1中、ステップ
4の下方向サーチにより、処理〔12〕に示すように退
避メモリ上の1ブロック、2ブロックに割り当てられ
る。
In this state, when a memory reservation request for the fourth program of 2 block size in process [11] occurs, the number of requested blocks is 2, and the process is performed by the downward search in step 4 in FIG. As shown in [12], it is assigned to one block and two blocks on the save memory.

【0023】ところで、このような動作を従前に説明し
た退避メモリの割り当て処理と同様に行った場合、従前
の図5中の2ブロックサイズの第4プログラムのメモリ
確保要求処理〔22〕が発生した際に、処理〔21〕の
退避メモリ状態になる。このため空きブロックが連続せ
ずに、エラー処理〔23〕が頻繁に必要になるが、本実
施例では、顕著に低減することになる。
By the way, when such an operation is performed in the same manner as the save memory allocation process described above, the memory reservation request process [22] for the fourth program of 2 blocks size in FIG. 5 is generated. At this time, the save memory state of the process [21] is entered. Therefore, the empty blocks are not continuous and the error processing [23] is frequently required, but in the present embodiment, it is significantly reduced.

【0024】[0024]

【発明の効果】以上の説明から明らかなように、本発明
の退避メモリ割り当て方法は、退避する確保要求ブロッ
ク個数を判断し、この要求ブロック個数によってメモリ
上の空きブロックをサーチする方向を変更することがで
きるため、従来、単一方向からの空きブロックサーチで
頻繁に発生していたエラー処理が低減できるという効果
を有する。
As is apparent from the above description, the save memory allocation method of the present invention determines the number of reserved request blocks to be saved, and changes the direction of searching for an empty block on the memory according to this request block number. Therefore, it is possible to reduce the error processing that frequently occurs in the conventional free block search from a single direction.

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

【図1】本発明の退避メモリ割り当て方法の実施例にお
ける双方向サーチによる処理手順を示すフローチャート
である。
FIG. 1 is a flowchart showing a processing procedure by bidirectional search in an embodiment of a save memory allocation method of the present invention.

【図2】実施例における退避メモリの大きさが4ブロッ
ク分の場合の処理状態を示す図である。
FIG. 2 is a diagram showing a processing state when the size of a save memory according to the embodiment is four blocks.

【図3】従来の退避メモリ割り当て方法における画面切
り換えの状態を示す図である。
FIG. 3 is a diagram showing a screen switching state in a conventional save memory allocation method.

【図4】従来の退避メモリの割り当ての処理手順を示す
フローチャートである。
FIG. 4 is a flowchart showing a processing procedure of conventional save memory allocation.

【図5】従来の退避メモリの大きさが4ブロック分の場
合の処理状態を示す図である。
FIG. 5 is a diagram showing a processing state when the size of a conventional save memory is 4 blocks.

【符号の説明】[Explanation of symbols]

S1 メモリ確保要求 S2 ブロック個数判断 S3 上方向サーチ S4 下方向サーチ S5 空きブロック判断 S6 管理TBL登録 S7 エラー処理 S1 Memory reservation request S2 Block number judgment S3 Upward search S4 Downward search S5 Empty block judgment S6 Management TBL registration S7 Error processing

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】メモリ確保要求の必要ブロック個数を判断
し、この要求ブロック個数によって、メモリ割り当てを
行うブロックサーチの方向変更を行うことを特徴とする
退避メモリ割り当て方法。
1. A save memory allocation method, characterized in that the required number of blocks for a memory reservation request is determined and the direction of a block search for memory allocation is changed according to the requested number of blocks.
【請求項2】メモリ割り当てを行うためのブロックサー
チの方向変更は、要求ブロック個数の判断によって上方
向サートと下方向サーチを行う双方向サーチであること
を特徴とする請求項1記載の退避メモリ割り当て方法。
2. The save memory according to claim 1, wherein the direction change of the block search for allocating the memory is a bidirectional search in which an upward search and a downward search are performed depending on the number of requested blocks. Assignment method.
【請求項3】コンピュータあるいはワードプロセッサに
おけるウィンドウ処理および/またはマルチグラフ処理
に適用されることを特徴とする請求項1または2記載の
退避メモリ割り当て方法。
3. The save memory allocation method according to claim 1, which is applied to window processing and / or multigraph processing in a computer or a word processor.
JP3327902A 1991-12-12 1991-12-12 Saving memory allocation method Pending JPH05165703A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3327902A JPH05165703A (en) 1991-12-12 1991-12-12 Saving memory allocation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3327902A JPH05165703A (en) 1991-12-12 1991-12-12 Saving memory allocation method

Publications (1)

Publication Number Publication Date
JPH05165703A true JPH05165703A (en) 1993-07-02

Family

ID=18204273

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3327902A Pending JPH05165703A (en) 1991-12-12 1991-12-12 Saving memory allocation method

Country Status (1)

Country Link
JP (1) JPH05165703A (en)

Similar Documents

Publication Publication Date Title
US6038571A (en) Resource management method and apparatus for information processing system of multitasking facility
CN106802939B (en) Method and system for solving data conflict
JPS6367685B2 (en)
JPH04284548A (en) Data base exclusive controlling system
JPH05165703A (en) Saving memory allocation method
CN110618946A (en) Stack memory allocation method, device, equipment and storage medium
US5797138A (en) Buffer management method using buffer locking mechanism in storage system for supporting multi-user environment
JP2621761B2 (en) Memory management method
JP3390317B2 (en) File exclusive control unit
JP3084812B2 (en) Program list output efficiency method
US20040039885A1 (en) Method and apparatus for isolating frames in a data processing system
KR20230081585A (en) Memory management method and semiconductor device adjusting size of contiguous memory allocation area
JPS6364146A (en) Logical space control system
JPH02304615A (en) Allocating system for parallel disk control buffer
JPH04257041A (en) Virtual storage management system
JPS62131352A (en) Address conversion control system
CN116266143A (en) Coroutine management method, device, equipment and medium
JPH07182298A (en) Method and device for processing information
JPS63265336A (en) Control system for preference allocation of shared resources
JP2666785B2 (en) Process termination processing method and apparatus
JPS6141827B2 (en)
JPH0244438A (en) File area allocation system
JPH0388041A (en) Task switching system
JPS62276645A (en) Logical space control system
JPS63103344A (en) Generation system for real address continuous idle memory