JP2001101080A - Method for managing dead buffer - Google Patents

Method for managing dead buffer

Info

Publication number
JP2001101080A
JP2001101080A JP28019299A JP28019299A JP2001101080A JP 2001101080 A JP2001101080 A JP 2001101080A JP 28019299 A JP28019299 A JP 28019299A JP 28019299 A JP28019299 A JP 28019299A JP 2001101080 A JP2001101080 A JP 2001101080A
Authority
JP
Japan
Prior art keywords
buffer
buffers
chain
memory
management table
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.)
Granted
Application number
JP28019299A
Other languages
Japanese (ja)
Other versions
JP3660173B2 (en
Inventor
Hiroaki Takahashi
宏彰 高橋
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.)
Hitachi Software Engineering Co Ltd
Original Assignee
Hitachi Software Engineering Co 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 Hitachi Software Engineering Co Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP28019299A priority Critical patent/JP3660173B2/en
Publication of JP2001101080A publication Critical patent/JP2001101080A/en
Application granted granted Critical
Publication of JP3660173B2 publication Critical patent/JP3660173B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)
  • Memory System (AREA)

Abstract

PROBLEM TO BE SOLVED: To attain the detection of any illegal memory access to a region beyond the range of captured buffers or released buffers or the like even in a normal operation by reducing the increase of processing overhead. SOLUTION: Continuous buffer regions constituted of plural buffers are divided into operating buffers to be preferentially used and waiting buffers to be used when the buffers to be preferentially used are all used so that the operating buffers and the waiting buffers can alternately appear as address. Then, the operating buffer chain is combined with the waiting buffer chain, and memory protection is set in each buffer. When released from the buffer chain accompanying a request for capturing the buffers, the memory protection of the buffers to be captured is released, and when connected accompanying a request for releasing the buffers, memory protection is set in the buffers to be released.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、オンライン情報処
理システムのホストコンピュータなどにおいて、動的に
メモリの割り当て/解放を行うために、メモリの空きバ
ッファをチェイン状にリンクして管理する空きバッファ
管理方法に関し、特に捕捉したバッファのバッファサイ
ズの範囲を超えたエリアへの不正なメモリアクセスの検
出、解放済みバッファへの不正なメモリアクセスの検
出、さらには解放済みバッファの二重解放の検出などが
容易に可能な空きバッファ管理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a vacant buffer management system in which vacant buffers in a memory are linked and managed in a chain in order to dynamically allocate / release memory in a host computer of an online information processing system. Methods include, among other things, detecting illegal memory access to areas outside the buffer size range of captured buffers, detecting illegal memory access to released buffers, and detecting double release of released buffers. The present invention relates to an easily available empty buffer management method.

【0002】[0002]

【従来の技術】従来、動的なメモリ割り当て要求、割り
当てられたメモリへのアクセス要求や解放要求などを含
むユーザプログラムが動作するコンピュータにおいて、
動的に割り当てられたメモリへユーザプログラムの不具
合によるアクセスが行われたことを自動的に検出する方
法としては、例えば、特開平7−319735号公報
(特許第275777号)に記載の方法がある。
2. Description of the Related Art Conventionally, in a computer on which a user program including a dynamic memory allocation request, a request for accessing and releasing a allocated memory, and the like is operated,
As a method of automatically detecting access to a dynamically allocated memory due to a failure of a user program, for example, there is a method described in JP-A-7-319735 (Japanese Patent No. 275777). .

【0003】この方法では、PMMU(Page Memory
Management Unit)と割込みハンドラを利用し、次の
ようにして動的割り当てメモリに関するアクセスだけに
限定した不正アクセスの検出を可能にしている。即ち、
ユーザプログラムでアクセスされる仮想アドレスはアク
セス不可であるように予めページ管理テーブルを構成し
ておく。ユーザプログラムの実行でメモリアクセスがあ
ると、PMMUはページ管理テーブルでアクセス不可を
知る。そこで、PMMUはCPUに割込みをかけ、割込
みハンドラを起動させる。この割込みハンドラの割込処
理の中でアクセス対象アドレスの正否を調べ、アクセス
可能な仮想アドレスへの変換を行い、これをPMMUへ
再度与える。PMMUは、この仮想アドレスを物理アド
レスに変換し、ユーザプログラムに制御を戻す。
In this method, a PMMU (Page Memory) is used.
Using a Management Unit) and an interrupt handler, it is possible to detect an illegal access limited to only access to a dynamically allocated memory as follows. That is,
The page management table is configured in advance so that the virtual address accessed by the user program cannot be accessed. If there is a memory access during execution of the user program, the PMMU knows that access is not possible in the page management table. Then, the PMMU interrupts the CPU and activates the interrupt handler. In the interrupt processing of the interrupt handler, the validity of the address to be accessed is checked, converted to an accessible virtual address, and given to the PMMU again. The PMMU translates this virtual address into a physical address and returns control to the user program.

【0004】[0004]

【発明が解決しようとする課題】上記従来の方法では、
メモリへの書き込みあるいは読み込みのアクセスが発生
するたびに、割込みハンドラでアクセスの正当性をチェ
ックすることができるため、動的に割り当てたメモリの
範囲を超えたメモリアクセスの検出、動的に割り当てた
メモリへの書き込み命令実行前の読み込み命令実行の検
出、さらに、解放済み動的割り当てメモリへのアクセス
の検出などが可能となる。
In the above conventional method,
Each time a write or read access to memory occurs, the interrupt handler can check the validity of the access, so memory accesses beyond the range of dynamically allocated memory are detected and dynamically allocated. This makes it possible to detect the execution of a read instruction before the execution of a write instruction to the memory and to detect the access to the released dynamically allocated memory.

【0005】しかしながら、メモリへの読み出しあるい
は書き込みのアクセスが有るたびに、割込みハンドラが
起動されて不正アクセスのチェックが行なわれるため、
処理のオーバヘッドが非常に大きいことから、ソフトウ
ェア開発ツール、不具合調査ツール、品質検査/向上ツ
ールといった分野での適用には有効であるが、運用シス
テムに適用する場合には、処理能力を十分に検討する必
要がある。
However, every time there is a read or write access to the memory, an interrupt handler is activated to check for unauthorized access.
Since the processing overhead is very large, it is effective for application in fields such as software development tools, defect investigation tools, and quality inspection / improvement tools. There is a need to.

【0006】また、オンライン情報処理システムなどに
おいて、ホストコンピュータが通信制御で送受信データ
を一時的に格納するために、動的に割り当てて使用され
る複数のバッファを対象に、上記従来方法を適用しよう
とすると、デバッグ期間中はともかく、運用システムで
の適用は処理能力的に非常に困難である。
Further, in an online information processing system or the like, the above-mentioned conventional method will be applied to a plurality of buffers that are dynamically allocated and used in order for a host computer to temporarily store transmission / reception data under communication control. Then, aside from during the debugging period, application in the operation system is very difficult in terms of processing capacity.

【0007】本発明の目的は、オンライン情報処理シス
テムのホストコンピュータなどにおいて、捕捉したバッ
ファのバッファサイズの範囲を超えたエリアへの不正な
メモリアクセスの検出、あるいは解放済みバッファへの
不正なメモリアクセスの検出、さらにはあるいは解放済
みバッファの二重解放の検出などを、処理のオーバヘッ
ドを極力抑えたかたちで実現でき、しかもデバッグ期間
中のみならず、運用システムへの適用も可能な、空きバ
ッファ管理方法を提供することにある。
An object of the present invention is to detect an illegal memory access to an area exceeding the buffer size range of a captured buffer or an illegal memory access to a released buffer in a host computer or the like of an online information processing system. Free buffer management that can be performed while minimizing the processing overhead and detecting the double release of released buffers, etc., and can be applied not only during the debugging period but also to the operation system. It is to provide a method.

【0008】[0008]

【課題を解決するための手段】空きバッファはチエイン
状にリンクしてバッファチエインとして管理される。本
発明は、メモリ保護の設定・解除単位と同一、またはそ
の整数倍のバッファサイズを有する複数のバッファから
構成される連続したバッファ領域を、優先的に使用する
運用バッファと、該運用バッファが全て使用されている
ときに使用する待機バッファとに分割し、さらに、連続
したバッファ領域のなかで、運用バッファと待機バッフ
ァとがアドレス的に交互に出現するように分割して、運
用バッファチェインと待機バッファチェインの2つのバ
ッファチェインを組み、どちらかのバッファチェインに
つながれている間は、該当するバッファにメモリ保護を
設定しておく。そして、バッファ捕捉要求に伴うどちら
かのバッファチェインからのとりはずし時に、捕捉する
バッファのメモリ保護を解除し、バッファ解放要求に伴
うどちらかのバッファチェインへのつなぎこみ時に、解
放するバッファのメモリ保護を設定する。
An empty buffer is linked as a chain and managed as a buffer chain. The present invention provides an operation buffer that preferentially uses a continuous buffer area composed of a plurality of buffers having the same or an integral multiple of the buffer size as a memory protection setting / cancellation unit, It is divided into a standby buffer used when it is used, and further divided so that the operation buffer and the standby buffer appear alternately in address in the continuous buffer area, and the operation buffer chain and the standby Two buffer chains of a buffer chain are assembled, and while connected to one of the buffer chains, memory protection is set for the corresponding buffer. Then, the memory protection of the buffer to be captured is released when removing from one of the buffer chains following the buffer capture request, and the memory protection of the buffer to be released is released when connecting to one of the buffer chains following the buffer release request. Set.

【0009】これにより、運用バッファの前後に、メモ
リ保護の設定された待機バッファが存在することにな
り、捕捉したバッファ以外のエリアへの不正なメモリ書
き込みを検出することが可能となる。また、解放済みバ
ッファにはメモリ保護が設定されるため、当該解放済み
のバッファへの不正メモリ書き込みの検出も可能とな
る。
[0009] As a result, a standby buffer for which memory protection is set exists before and after the operation buffer, and it is possible to detect an illegal memory write to an area other than the captured buffer. Further, since memory protection is set for the released buffer, it is possible to detect illegal memory writing to the released buffer.

【0010】さらに、本発明では、バッファ解放要求に
伴うバッファチェインへのつなぎこみ時に、解放するバ
ッファ内の任意のメモリの内容を読み出し、該読み出し
た内容を再び同じメモリに書き込んでから、メモリ保護
を設定する。これにより、メモリへの再書き込みの際
に、バッファの2重解放を検出することが可能となる。
Further, according to the present invention, at the time of connection to a buffer chain associated with a buffer release request, the contents of an arbitrary memory in the buffer to be released are read, and the read contents are written again to the same memory, and then the memory protection is performed. Set. This makes it possible to detect double release of the buffer at the time of rewriting to the memory.

【0011】[0011]

【発明の実施の形態】以下、本発明を図示する実施例に
基づき詳細に説明する。図1は、本発明の一実施例を示
し、これは通信回線103を介して端末装置102と接
続されるホストコンピュータ101に適用した場合の全
体的システム構成を示す図である。ホストコンピュータ
101には、一般に多数の端末装置が接続されるが、便
宜上、図1では一台の端末装置のみを示している。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described in detail based on embodiments shown in the drawings. FIG. 1 shows an embodiment of the present invention, which is a diagram showing an overall system configuration when applied to a host computer 101 connected to a terminal device 102 via a communication line 103. Although a large number of terminal devices are generally connected to the host computer 101, for convenience, FIG. 1 shows only one terminal device.

【0012】図において、ホストコンピュータ101
は、通信制御部104、バッファ捕捉部105、バッフ
ァ解放部106、バッファ管理情報初期設定部107の
各処理部、及び、主記憶108から構成される。主記憶
108は、バッファが複数個確保されているバッファ領
域112と、バッファ領域112に確保された複数のバ
ッファを管理するバッファ管理テーブル111と、複数
のバッファを運用空きバッファチェインと待機空きバッ
ファチェインに大別して管理するための、運用空きバッ
ファチェイン管理テーブル109と待機空きバッファチ
ェイン管理テーブル110を有している。
In the figure, a host computer 101
Is composed of a communication control unit 104, a buffer capture unit 105, a buffer release unit 106, processing units of a buffer management information initial setting unit 107, and a main memory 108. The main memory 108 includes a buffer area 112 in which a plurality of buffers are secured, a buffer management table 111 for managing a plurality of buffers secured in the buffer area 112, and a plurality of buffers for operating free buffer chains and standby free buffer chains. It has an operation free buffer chain management table 109 and a standby free buffer chain management table 110, which are roughly managed.

【0013】通信制御部104は、端末装置102との
通信を制御するもので、該通信制御部104が端末装置
102とデータの送受信を行う際に送受信データを一時
的に格納するために、主記憶108のバッファ領域11
2に確保されているバッファが使用される。通信制御部
104では、新しくバッファを使用する場合、バッファ
捕捉要求をバッファ捕捉部105へ出し、使用中のバッ
ファを解放する場合、バッファ解放要求をバッファ解放
部106へ出す。
The communication control unit 104 controls communication with the terminal device 102. When the communication control unit 104 transmits and receives data to and from the terminal device 102, the communication control unit 104 temporarily stores transmission / reception data. Buffer area 11 of storage 108
2 is used. The communication control unit 104 issues a buffer capture request to the buffer capture unit 105 when a new buffer is used, and issues a buffer release request to the buffer release unit 106 when releasing a buffer in use.

【0014】バッファ捕捉部105は、通信制御部10
4からバッファ捕捉要求を受け取ると、運用/待機空き
バッファチェイン管理テーブル109,110、バッフ
ァ管理テーブル111を参照して、運用/待機空きバッ
ファチェインからのバッファ捕捉処理を実行する。この
時、捕捉したバッファのメモリ保護を解除する。バッフ
ァ解放部106は、通信制御部104からバッファ解放
要求を受け取ると、解放されるバッファがつながってい
たバッファチェインに対応する運用/待機空きバッファ
チェイン管理テーブルを対象にバッファ解放処理を実行
する。この時、解放するバッファのメモリ保護を設定す
る。
The buffer capturing unit 105 includes a communication control unit 10
4 receives the buffer capture request from the active / standby free buffer chain management tables 109 and 110 and the buffer management table 111, and executes a buffer capture process from the active / standby free buffer chain. At this time, the memory protection of the captured buffer is released. Upon receiving the buffer release request from the communication control unit 104, the buffer release unit 106 executes a buffer release process on the operation / standby free buffer chain management table corresponding to the buffer chain to which the released buffer is connected. At this time, the memory protection of the buffer to be released is set.

【0015】バッファ管理情報初期設定部107は、各
種バッファ管理情報を初期設定する。具体的動作は後述
するが、このバッファ管理情報初期設定部107にて、
メモリ保護の設定・解除単位と同一、またはその整数倍
のバッファサイズを有する複数のバッファから構成され
る連続したバッファ領域112を運用バッファとに待機
バッファと分割し、さらに、この連続したバッファ領域
112のなかで、運用バッファと待機バッファとがアド
レス的に交互に出現するように分割して、運用バッファ
チェインと待機バッファチェインの2つのバッファチェ
インを組み、運用/待機空バッファチェイン管理テーブ
ル109,110及びバッファ管理テーブル111の内
容を初期設定する。さらに、この初期設定時、運用待機
バッファチェインにつながる各バッファにメモリ保護を
設定しておく。
The buffer management information initialization section 107 initializes various types of buffer management information. Although the specific operation will be described later, the buffer management information initial setting unit 107
A continuous buffer area 112 composed of a plurality of buffers having the same or an integral multiple of the unit size of the memory protection setting / cancellation unit is divided into an operation buffer and a standby buffer. Among them, the operation buffer and the standby buffer are divided so that they appear alternately in terms of address, and two buffer chains, an operation buffer chain and a standby buffer chain, are assembled, and the operation / standby empty buffer chain management tables 109 and 110 are formed. Then, the contents of the buffer management table 111 are initialized. Further, at the time of this initial setting, memory protection is set for each buffer connected to the operation standby buffer chain.

【0016】図2は、運用空きバッファチェイン管理テ
ーブル109の構成例を示す説明図である。運用空きバ
ッファチェイン管理テーブル109は、運用空きバッフ
ァチェインの先頭につながれているバッファ情報を示す
先頭バッファ管理テーブルポインタ(F_B_MNG_P)201
と、該チェインの最後につながれているバッファ情報を
示す最終バッファ管理テーブルポインタ(L_B_MNG_P)2
02とから構成される。
FIG. 2 is an explanatory diagram showing a configuration example of the operation free buffer chain management table 109. The operation free buffer chain management table 109 includes a head buffer management table pointer (F_B_MNG_P) 201 indicating buffer information connected to the head of the operation free buffer chain.
And a last buffer management table pointer (L_B_MNG_P) 2 indicating buffer information connected at the end of the chain.
02.

【0017】図3は、待機空きバッファチェイン管理テ
ーブル110の構成例を示す説明図である。待機空きバ
ッファチェイン管理テーブル110は、待機空きバッフ
ァチェインの先頭につながれているバッファ情報を示す
先頭バッファ管理テーブルポインタ(F_B_MNG_P)301
と、該チェインの最後につながれているバッファ情報を
示す最終バッファ管理テーブルポインタ(L_B_MNG_P)3
02とから構成される。
FIG. 3 is an explanatory diagram showing an example of the configuration of the standby free buffer chain management table 110. The standby free buffer chain management table 110 has a head buffer management table pointer (F_B_MNG_P) 301 indicating buffer information connected to the head of the standby free buffer chain.
And a last buffer management table pointer (L_B_MNG_P) 3 indicating buffer information connected to the end of the chain.
02.

【0018】図4は、バッファ管理テーブル111の構
成例を示す説明図である。ここで、管理対象のバッファ
領域112は、図5に示すように、バッファサイズが4
キロバイトのバッファ7個から構成され、それぞれのバ
ッファの先頭アドレスが、バッファ(0)500がH'0000
番地、バッファ(1)501がH'1000番地、バッファ(2)
502がH'2000番地、バッファ(3)503がH'3000番
地、バッファ(4)504がH'4000番地、バッファ(5)5
05がH'5000番地、バッファ(6)506がH'6000番地で
あるとする。
FIG. 4 is an explanatory diagram showing an example of the configuration of the buffer management table 111. Here, the buffer area 112 to be managed has a buffer size of 4 as shown in FIG.
It is composed of seven kilobyte buffers, and the head address of each buffer is H'0000 in buffer (0) 500.
Address, buffer (1) 501 is address H'1000, buffer (2)
502 is H'2000, buffer (3) 503 is H'3000, buffer (4) 504 is H'4000, and buffer (5) 5
It is assumed that 05 is H'5000 and the buffer (6) 506 is H'6000.

【0019】図4において、バッファ管理テーブル11
1はテーブル400〜406からなり、それぞれ図5の
バッファ500〜506に対応している。具体的には、
バッファ(0)500を管理するバッファ管理テーブル0
(B_MNB0)400は、運用空きバッファチェインあるいは
待機空きバッファチェインを組むための、次リンクテー
ブルポインタ(N_LNK_P)407と、当該バッファ(0)5
00の先頭アドレスを格納するバッファポインタ(BUF_
P)408とから構成される。ここでは、バッファポイン
タ408には、具体的な先頭アドレスとしてH'0000が設
定される。バッファ(1)501からバッファ(6)506
を管理する、バッファ管理テーブル1(B_MNB1)401か
らバッファ管理テーブル6(B_MNB6)406も同様な構成
である。
In FIG. 4, the buffer management table 11
1 includes tables 400 to 406, which correspond to the buffers 500 to 506 in FIG. 5, respectively. In particular,
Buffer management table 0 for managing buffer (0) 500
The (B_MNB0) 400 includes a next link table pointer (N_LNK_P) 407 for forming an operation free buffer chain or a standby free buffer chain, and the buffer (0) 5.
00 buffer address (BUF_
P) 408. Here, H'0000 is set in the buffer pointer 408 as a specific start address. Buffer (1) 501 to Buffer (6) 506
The buffer management table 1 (B_MNB1) 401 to the buffer management table 6 (B_MNB6) 406 have the same configuration.

【0020】図5のバッファ(0)500からバッファ
(6)506は、運用/待機のどちらかのバッファチェイ
ンにつながれている間は、当該バッファにメモリ保護が
設定される。メモリ保護機能には、プロセッサアーキテ
クチャにより、キー方式、リング方式、アクセス権方式
の各種が存在し、保護の範囲も、プロセッサアーキテク
チャや仮想メモリ方式に依存して、ページ単位やセグメ
ント単位といった各種の形態が存在している。本発明
は、メモリ保護機能を実現する方式には左右されない
が、メモリ保護範囲に左右されるものであり、例えばメ
モリ保護範囲が1キロバイト単位である場合には、バッ
ファサイズを1キロバイトの整数倍(1キロバイト、2
キロバイト、…)、また、メモリ保護範囲が2キロバイ
ト単位の場合には、バッファサイズを2キロバイトの整
数倍(2キロバイト、4キロバイト、…)にする必要が
ある。図5の具体的実施例では、メモリ保護範囲が4キ
ロバイト単位のアーキテクチャからなるプロセッサで実
現する場合の実施例であり、プロセッサアーキテクチャ
でメモリ保護単位が8キロバイトの場合には、本実施例
の2倍のバッファ領域112を確保する必要がある。
The buffer from the buffer (0) 500 in FIG.
(6) In step 506, while being connected to either the operation / standby buffer chain, memory protection is set for the buffer. Depending on the processor architecture, there are various types of memory protection functions, such as a key system, a ring system, and an access right system, and the scope of protection depends on the processor architecture and virtual memory system, and is in various forms such as page units and segment units. Exists. The present invention does not depend on the method of realizing the memory protection function, but depends on the memory protection range. For example, when the memory protection range is in units of 1 kilobyte, the buffer size is an integral multiple of 1 kilobyte. (1 kilobyte, 2
If the memory protection range is in units of 2 kilobytes, the buffer size must be an integral multiple of 2 kilobytes (2 kilobytes, 4 kilobytes,...). The specific embodiment of FIG. 5 is an embodiment in which the memory protection range is realized by a processor having an architecture in units of 4 kilobytes, and when the memory protection unit is 8 kilobytes in the processor architecture, the second embodiment of the present invention is used. It is necessary to secure twice the buffer area 112.

【0021】以下に、バッファ管理情報初期設定部10
7、バッファ捕捉部105及びバッファ解放部106の
動作について説明する。なお、バッファ領域112は図
5に示した構成をとるとする。
Hereinafter, the buffer management information initial setting unit 10
7. Operations of the buffer capturing unit 105 and the buffer releasing unit 106 will be described. It is assumed that the buffer area 112 has the configuration shown in FIG.

【0022】図6に、バッファ管理情報初期設定部10
7で実行される、バッファ管理情報初期設定処理の処理
フローを示す。このバッファ管理情報初期設定処理は、
例えばシステムの立上げ時などに実行される。
FIG. 6 shows a buffer management information initial setting unit 10.
7 shows a processing flow of buffer management information initialization processing executed in Step S7. This buffer management information initial setting process
For example, it is executed when the system is started.

【0023】バッファ管理情報初期設定処理では、ま
ず、領域サイズが7キロバイトのバッファ領域112を
捕捉し(ステップ601)、捕捉したバッファ領域11
2の全領域にメモリ保護を設定する(ステップ60
2)。次に、捕捉したバッファ領域112を、バッファ
サイズがそれぞれ1キロバイトの7つのバッファ、即
ち、図5に示したバッファ(0)500、バッファ(1)5
01、バッファ(2)502、バッファ(3)503、バッ
ファ(4)504、バッファ(5)505、バッファ(6)5
06に分割し、図4に示したように、バッファ管理テー
ブル111のそれぞれの管理テーブル400〜406の
各バッファポインタ(BUF_P)408,410,412,
146,148,420に当該バッファ500〜506
の先頭アドレスを設定する(ステップ603)。次に、
本実施例では、奇数番目のバッファ、即ち、バッファ
(1)501、バッファ(3)503、バッファ(5)505
を運用バッファとして運用空きバッファチェイン管理テ
ーブル109につなぎこみ(ステップ604)、偶数番
目のバッファ、即ち、バッファ(0)500、バッファ
(2)502、バッファ(4)504、バッファ(6)506
を待機バッファとして待機空きバッファチェイン管理テ
ーブル110につなぎこみ(ステップ605)、バッフ
ァ管理情報初期設定処理を終了する。
In the buffer management information initial setting process, first, the buffer area 112 having an area size of 7 kilobytes is captured (step 601).
2 is set with memory protection (step 60).
2). Next, the captured buffer area 112 is divided into seven buffers each having a buffer size of 1 kilobyte, that is, the buffer (0) 500 and the buffer (1) 5 shown in FIG.
01, buffer (2) 502, buffer (3) 503, buffer (4) 504, buffer (5) 505, buffer (6) 5
06, and as shown in FIG. 4, each buffer pointer (BUF_P) 408, 410, 412 of each of the management tables 400 to 406 of the buffer management table 111.
The buffers 500 to 506 are stored in 146, 148, and 420.
Is set (step 603). next,
In the present embodiment, the odd-numbered buffer, that is, the buffer
(1) 501, buffer (3) 503, buffer (5) 505
Is connected to the operation free buffer chain management table 109 as the operation buffer (step 604), and the even-numbered buffer, that is, the buffer (0) 500, the buffer
(2) 502, buffer (4) 504, buffer (6) 506
Is connected to the standby free buffer chain management table 110 as a standby buffer (step 605), and the buffer management information initial setting process ends.

【0024】図7は、バッファ管理情報初期設定部10
7がバッファ管理情報初期設定処理を実行した直後の、
運用空きバッファチェイン管理テーブル109、待機空
きバッファチェイン管理テーブル110、及び、バッフ
ァ管理テーブル111内の各バッファ500〜506に
対応するバッファ管理テーブル(0)400、バッファ管
理テーブル(1)401、バッファ管理テーブル(2)40
2、バッファ管理テーブル(3)403、バッファ管理テ
ーブル(4)404、バッファ管理テーブル(5)405、
バッファ管理テーブル(6)406の具体的構成を示した
ものである。この時点で、バッファ領域112の各バッ
ファ500〜506は、すべてメモリ保護が設定され
る。
FIG. 7 shows a buffer management information initial setting unit 10.
7 immediately after executing the buffer management information initial setting process,
Buffer management table (0) 400, buffer management table (1) 401, buffer management table corresponding to each buffer 500 to 506 in the operation empty buffer chain management table 109, the standby empty buffer chain management table 110, and the buffer management table 111. Table (2) 40
2. Buffer management table (3) 403, buffer management table (4) 404, buffer management table (5) 405,
It shows a specific configuration of the buffer management table (6) 406. At this point, memory protection is set for all the buffers 500 to 506 in the buffer area 112.

【0025】図8に、バッファ捕捉部105で実行され
る、バッファ捕捉処理の処理フローを示す。このバッフ
ァ捕捉処理は通信制御部104からバッファ捕捉要求を
受けるごとに実行される。
FIG. 8 shows a processing flow of the buffer capturing process executed by the buffer capturing section 105. This buffer capture process is executed each time a buffer capture request is received from the communication control unit 104.

【0026】バッファ捕捉処理では、まず、運用空きバ
ッファチェイン管理テーブル109から、先頭バッファ
管理テーブルポインタ(F_B_MNG_P)201を抽出し(ス
テップ801)、抽出したポインタがNULLPかを判定す
る(ステップ802)。ステップ802の判定で、NULL
Pでない、つまり運用空きバッファチェインに空きバッ
ファがあると判定されると、運用空きバッファチェイン
管理テーブル109から、先頭のバッファを取り外し
(ステップ803)、該捕捉したバッファのメモリ保護
を解除し(ステップ804)、バッファ捕捉結果=成功
として、捕捉したバッファのポインタを捕捉要求元へ返
却し(ステップ805)、即ち、本実施例では通信制御
部104へ返却し、バッファ捕捉処理を終了する。ステ
ップ802の判定で、NULLPつまり運用空きバッファチ
ェインに空きバッファが無いと判定されると、待機空き
バッファチェイン管理テーブル110から、先頭バッフ
ァ管理テーブルポインタ(F_B_MNG_P)301を抽出し
(ステップ806)、抽出したポインタがNULLPかを判
定する(ステップ807)。ステップ807の判定で、
NULLPでない、つまり待機空きバッファチェインに空き
バッファがあると判定されると、待機空きバッファチェ
イン管理テーブル110から、先頭のバッファを取り外
し(ステップ808)、ステップ804,805の処理
を実行する。ステップ807で、NULLPつまり待機空き
バッファチェインにも空きバッファが無いと判定される
と、バッファ捕捉結果=失敗として捕捉要求元へ返却し
(ステップ809)、バッファ捕捉処理を終了する。
In the buffer capturing process, first, a head buffer management table pointer (F_B_MNG_P) 201 is extracted from the operation free buffer chain management table 109 (step 801), and it is determined whether the extracted pointer is NULLP (step 802). NULL in the judgment of step 802
If it is not P, that is, if it is determined that there is a free buffer in the working free buffer chain, the first buffer is removed from the working free buffer chain management table 109 (step 803), and the memory protection of the captured buffer is released (step 803). 804) Assuming that the buffer capture result = success, the pointer of the captured buffer is returned to the capture request source (step 805). That is, in this embodiment, the buffer is returned to the communication control unit 104, and the buffer capture process is terminated. If it is determined in step 802 that there is no free buffer in the NULLP, that is, the operation free buffer chain, the leading buffer management table pointer (F_B_MNG_P) 301 is extracted from the standby free buffer chain management table 110 (step 806). It is determined whether the pointer that has been set is NULLP (step 807). In the judgment of step 807
If it is not NULLP, that is, if it is determined that there is an empty buffer in the standby empty buffer chain, the first buffer is removed from the standby empty buffer chain management table 110 (step 808), and the processing of steps 804 and 805 is executed. If it is determined in step 807 that there is no empty buffer in the NULLP, that is, the standby empty buffer chain, the buffer is returned to the capture request source as the buffer capture result = failure (step 809), and the buffer capture process ends.

【0027】図9は、図7の初期状態で、図8のバッフ
ァ捕捉処理が実行され、運用空きバッファチェインの先
頭につながれていたバッファ(1)501が捕捉された後
の、運用空きバッファチェイン管理テーブル109、待
機空きバッファチェイン管理テーブル110、及び、バ
ッファ管理テーブル111内のバッファ(1)501を除
く各バッファ500,502〜506に対応するバッフ
ァ管理テーブル(0)400バッファ管理テーブル(2)4
02、バッファ管理テーブル(3)403、バッファ管
理テーブル(4)404、バッファ管理テーブル(5)
405、バッファ管理テーブル(6)406の具体的構
成を示したものである。
FIG. 9 shows the initial state of FIG. 7, in which the buffer capture processing of FIG. 8 is executed, and after the buffer (1) 501 connected to the head of the active empty buffer chain is captured, the active empty buffer chain Buffer management table (0) 400 buffer management table (2) corresponding to each of the buffers 500, 502 to 506 except the buffer (1) 501 in the management table 109, the standby free buffer chain management table 110, and the buffer management table 111 4
02, buffer management table (3) 403, buffer management table (4) 404, buffer management table (5)
405, a specific configuration of the buffer management table (6) 406.

【0028】図9に着目するに、バッファ領域112の
バッファ(1)501の領域(運用バッファ領域)のみ
が、メモリ保護が解除されており、この前後に、メモリ
保護の設定されたバッファ500,502の領域(待機
バッファ領域)が存在する。したがって、捕捉したバッ
ファ(1)501のバッファサイズの範囲を超えたエリ
ア、即ち、バッファ500,502の領域への不正なメ
モリ書込みなどのメモリアクセスが行われた場合、メモ
リ保護違反が発生し、該不正なメモリアクセスを容易に
検出することが可能となる。
Note that in FIG. 9, only the area of the buffer (1) 501 in the buffer area 112 (operating buffer area) has been released from memory protection. There is an area 502 (standby buffer area). Therefore, when a memory access such as an illegal memory write is performed on an area exceeding the buffer size range of the captured buffer (1) 501, that is, an area of the buffers 500 and 502, a memory protection violation occurs. The illegal memory access can be easily detected.

【0029】なお、図8のバッファ捕捉処理では、ステ
ップ802で運用空きバッファチェインに空きバッファ
が無いと判定された場合、待機空きバッファチェインか
ら空きバッファを捕捉するため、運用空きバッファチェ
インのバッファ(1)501、バッファ(3)503、バッ
ファ(5)505に続いて、待機空きバッファチェインに
組み込まれているバッファ(0)500、バッファ(2)5
02、バッファ(4)504、バッファ(6)506が使用
されると、その使用されている間は、連続するバッファ
領域のメモリ保護が解除されてしまい、捕捉したバッフ
ァのバッファサイズの範囲を超えた領域への不正なメモ
リアクセスを検出できなくなる。本実施例は、このよう
なことは非常に稀れであるとして許容するものである
が、これは次のようにして回避することが可能である。
即ち、図8のステップ802で、運用空きバッファチェ
インに空きバッファが無いと判定された場合、待機空き
バッファチェインから空きバッファを捕捉するのではな
く、ステップ809の処理を実行して、バッファ捕捉結
果=失敗を補足要求元へ返却するようにする。これによ
り、待機空きバッファチェインに組み込まれている、バ
ッファ2502、バッファ4504、バッファ6506
が常にメモリ保護がかかっていることとなり、図8で説
明した処理フローをとる場合より、バッファの不法アク
セス検出能力が向上する。
In the buffer capturing process of FIG. 8, when it is determined in step 802 that there is no empty buffer in the active empty buffer chain, the empty buffer buffer is captured from the standby empty buffer chain. 1) 501, buffer (3) 503, buffer (5) 505, followed by buffer (0) 500 and buffer (2) 5 incorporated in the standby free buffer chain.
02, when the buffer (4) 504 and the buffer (6) 506 are used, the memory protection of the continuous buffer area is released while the buffer (4) 504 and the buffer (6) 506 are used, and the buffer size exceeds the buffer size range of the captured buffer. Unable to detect illegal memory access to the area. The present embodiment allows such a situation to be extremely rare, but this can be avoided as follows.
That is, if it is determined in step 802 in FIG. 8 that there is no empty buffer in the active empty buffer chain, the process of step 809 is executed instead of capturing an empty buffer from the standby empty buffer chain, and the = Return the failure to the supplementary request source. As a result, the buffer 2502, the buffer 4504, and the buffer 6506 incorporated in the standby empty buffer chain
Is always protected, and the ability to detect illegal access of the buffer is improved as compared with the case where the processing flow described in FIG. 8 is taken.

【0030】また、バッファ捕捉処理の入力パラメータ
として、バッファ捕捉要求元が必要とするバッファサイ
ズを通知するようにし、捕捉したバッファの先頭ではな
く最終アドレスから捕捉要求バッファサイズ分を差し引
いたアドレスを、捕捉バッファの先頭アドレスとして捕
捉要求元に返却する処理としてもよい。この場合、捕捉
要求元が必要と考えているバッファサイズよりも大きい
範囲で誤って使用している場合、捕捉したバッファの次
には、待機バッファとしてメモリ保護がかかっているた
め、メモリ保護違反を検出できる可能性が高まる。
Also, as an input parameter of the buffer capture processing, the buffer size required by the buffer capture request source is notified, and an address obtained by subtracting the capture request buffer size from the last address instead of the head address of the captured buffer is used. The processing may be returned to the capture request source as the start address of the capture buffer. In this case, if the capture requester incorrectly uses the buffer in a range larger than the buffer size that the capture requester considers necessary, a memory protection violation occurs because the captured buffer is protected by memory as a standby buffer. The possibility of detection increases.

【0031】図10に、バッファ解放部106で実行さ
れる、バッファ解放処理の処理フローを示す。このバッ
ファ解放処理は通信制御部104からバッファ解放要求
を受けるごとに実行される。
FIG. 10 shows a processing flow of the buffer release processing executed by the buffer release unit 106. This buffer release processing is executed every time a buffer release request is received from the communication control unit 104.

【0032】バッファ解放処理では、まず、解放要求の
あったバッファの先頭メモリの内容を読み取り(ステッ
プ1001)、読み取った値を、解放要求のあったバッ
ファの先頭メモリに書き込む処理を実行する(ステップ
1002)。次に、解放要求のあったバッファのメモリ
保護を設定する(ステップ1003)。次に、解放要求
のあったバッファのつなぎこむバッファチェインを判定
し(ステップ1004)、運用空きバッファチェインの
場合は、運用空きバッファチェイン管理テーブル109
の最後に解放要求のあったバッファをつなぎこみ(ステ
ップ1005)、待機空きバッファチェインの場合は、
待機空きバッファチェイン管理テーブル110の最後に
解放要求のあったバッファをつなぎこんで(ステップ1
006)、バッファ解放処理を終了する。
In the buffer release processing, first, the contents of the head memory of the buffer requested to be released are read (step 1001), and the read value is written to the head memory of the buffer requested to be released (step 1001). 1002). Next, the memory protection of the buffer for which the release request has been made is set (step 1003). Next, a buffer chain to be connected to the buffer requested to be released is determined (step 1004), and in the case of an operation free buffer chain, the operation free buffer chain management table 109 is used.
Is connected at the end of the request (step 1005).
At the end of the standby free buffer chain management table 110, a buffer that has been requested to be released is connected (step 1).
006), the buffer release processing ends.

【0033】図10において、ステップ1001および
1002で、解放要求のあったバッファの先頭メモリの
読み取り及び書き込みを実施する目的は、バッファの二
重解放を検出するためである。即ち、バッファが既に解
放されている場合には、ステップ1003に示したよう
に、メモリ保護が設定されており、このため、既に解放
したバッファに対してさらに解放要求が行われた場合、
ステップ1002のメモリへの書き込み処理で、メモリ
保護違反が発生し、バッファの二重解放バグなどを容易
に検出することが可能となる。なお、ステップ100
1,1002では、解放要求のあったバッファの先頭メ
モリに対してリード/ライトを実行するとしたが、特に
先頭メモリである必要はない。
In FIG. 10, the purpose of reading and writing the head memory of the buffer requested to be released in steps 1001 and 1002 is to detect double release of the buffer. That is, when the buffer has already been released, the memory protection has been set as shown in step 1003. Therefore, when a further release request is made for the already released buffer,
In the process of writing to the memory in step 1002, a memory protection violation occurs, and it is possible to easily detect a double release bug in the buffer. Step 100
In 1,1002, the read / write is executed for the head memory of the buffer for which the release request has been made, but it is not particularly necessary to be the head memory.

【0034】図10のステップ1002で、メモリ保護
違反を検出した場合、例えば従来機能による割り込み処
理ルーチンの中で、システムの部分初期設定あるいは関
連処理の部分初期設定といった処理を行い、バッファの
二重解放をガードするとともに、解放したバッファをし
ばらく使い続けてしまうバグがシステムに及ぼす影響を
小さくするなど、バグの影響範囲を局所化することが可
能となる。
When a memory protection violation is detected in step 1002 in FIG. 10, for example, a process such as a partial initialization of a system or a partial initialization of a related process is performed in an interrupt processing routine by a conventional function, and a double buffer is executed. In addition to guarding the release, it is possible to localize the scope of the bug, such as by reducing the effect on the system of a bug that keeps using the released buffer for a while.

【0035】図11は、図9の状態で、図10のバッフ
ァ解放処理が実行されて、図8のバッファ捕捉処理で捕
捉されたバッファ(1)501が解放された後の、運用空
きバッファチェイン管理テーブル109、待機空きバッ
ファチェイン管理テーブル110、及び、バッファ管理
テーブル111内の各バッファ500〜506に対応す
るバッファ管理テーブル(0)401、バッファ管理テー
ブル(1)401、バッファ管理テーブル(2)402、バ
ッファ管理テーブル(3)403、バッファ管理テーブル
(4)404、バッファ管理テーブル(5)405、バッフ
ァ管理テーブル(6)406具体的構成を示したものであ
る。
FIG. 11 shows the operation free buffer chain after the buffer release processing of FIG. 10 is executed in the state of FIG. 9 and the buffer (1) 501 captured by the buffer capture processing of FIG. 8 is released. The buffer management table (0) 401, the buffer management table (1) 401, and the buffer management table (2) corresponding to each of the buffers 500 to 506 in the management table 109, the standby free buffer chain management table 110, and the buffer management table 111. 402, buffer management table (3) 403, buffer management table
(4) 404, a buffer management table (5) 405, and a buffer management table (6) 406.

【0036】図11に示すように、解放されたバッファ
(1)501には、メモリ保護が設定されるため、該解放
済みバッファ(1)501への不正なメモリ書込みなどの
メモリアクセスが行われた場合、メモリ保護違反が発生
し、該不正メモリアクセスを容易に検出することが可能
となる。また、該解放済みバッファ(1)501に対して
さらに解放要求が行われた場合も、上記ステップ100
2の実行で2重解放を検出することが可能となる。バッ
ファの二重解放が発生すると、空バッファチェイン破壊
の原因となるため、バッファ二重解放は極力防止する必
要がある。
As shown in FIG. 11, the released buffer
Since (1) 501 is set with memory protection, if a memory access such as an illegal memory write to the released buffer (1) 501 is performed, a memory protection violation occurs and the illegal memory access is performed. Can be easily detected. Also, when a further release request is made to the released buffer (1) 501, the above-mentioned step 100 is performed.
Execution of 2 makes it possible to detect double release. If double release of the buffer occurs, the empty buffer chain may be destroyed. Therefore, it is necessary to prevent double release of the buffer as much as possible.

【0037】以上説明してきた具体的実施例は、実記憶
のみのシステムにも、また、実記憶のほかに仮想記憶を
持つシステムのどちらにも適応可能であるが、実記憶の
ほかに仮想記憶を持つシステムに対しては、論理空間
(仮想記憶)には運用バッファと待機バッファの双方を
生成するが、物理空間(実記憶)には運用バッファのみ
を生成することで、実施例で説明した場合と同じ作用効
果をあげることが出来る。この場合、運用空きバッファ
がなくなった時に、待機空きバッファチェインからの捕
捉を行わないのは言うまでもない。さらに、待機空きバ
ッファチェインそのものも不要である。
The specific embodiment described above can be applied to either a system having only real storage or a system having virtual storage in addition to real storage. As described in the embodiment, for a system having, both the operation buffer and the standby buffer are generated in the logical space (virtual storage), but only the operation buffer is generated in the physical space (real storage). The same effect can be obtained as in the case. In this case, it is needless to say that the capture from the standby empty buffer chain is not performed when the operation empty buffer runs out. Further, the standby empty buffer chain itself is unnecessary.

【0038】[0038]

【発明の効果】以上説明したように、本発明では、空き
バッファをチェイン状にリンクして管理する空きバッフ
ァ管理において、複数のバッファから構成される連続し
たバッファ領域を、優先的に使用する運用バッファと、
該運用バッファが全て使用されているときに使用する待
機バッファとに分割し、かつ、運用バッファと待機バッ
ファとがアドレス的に交互に出現するように分割して、
運用バッファチェインと待機バッファチェインの2つの
バッファチェインを組み、どちらかのバッファチェイン
につながれている間は、該当するバッファにメモリ保護
を設定しておき、バッファ捕捉要求に伴うどちらかのバ
ッファチェインからのとりはずし時に、捕捉するバッフ
ァのメモリ保護を解除し、バッファ解放要求に伴うどち
らかのバッファチェインへのつなぎこみ時に、解放する
バッファのメモリ保護を設定する。これにより、運用バ
ッファの前後に、メモリ保護の設定された待機バッファ
が存在することになり、捕捉したバッファ以外のエリア
への不正なメモリ書き込みなどのメモリアクセスを検出
することが可能となり、しかも、解放済みバッファはメ
モリ保護が設定されるため、当該解放済みのバッファへ
の不正メモリ書き込みの検出も可能となる。
As described above, according to the present invention, in the free buffer management for managing the free buffers by linking them in a chain, an operation in which a continuous buffer area composed of a plurality of buffers is preferentially used. Buffers and
The operation buffer is divided into a standby buffer to be used when all of the operation buffers are used, and the operation buffer and the standby buffer are divided so that they appear alternately in address,
Combine two buffer chains, the active buffer chain and the standby buffer chain. While connected to one of the buffer chains, set the memory protection for the corresponding buffer and set the buffer protection from either buffer chain accompanying the buffer capture request. At the time of removal, the memory protection of the buffer to be captured is released, and at the time of connection to one of the buffer chains following a buffer release request, the memory protection of the buffer to be released is set. As a result, before and after the operation buffer, there is a standby buffer with memory protection set, and it is possible to detect a memory access such as an illegal memory write to an area other than the captured buffer, and Since memory protection is set for the released buffer, it is possible to detect illegal memory write to the released buffer.

【0039】また、本発明では、バッファ解放要求に伴
うバッファチェインへのつなぎこみ時に、解放するバッ
ファ内の任意のメモリの内容を読み出し、読み出した値
を再び同じメモリに書き込んでから、メモリ保護を設定
することにより、バッファの2重解放を検出することが
可能となる。
Further, according to the present invention, at the time of connection to a buffer chain in response to a buffer release request, the contents of an arbitrary memory in the buffer to be released are read, and the read value is written again to the same memory. By setting, double release of the buffer can be detected.

【0040】さらには、バッファ捕捉要求において、運
用バッファが全て使用中の時は、待機バッファの捕捉は
行わず、捕捉要求元にバッファ捕捉失敗を返却するよう
にすれば、待機空きバッファチェインに組み込まれてい
るバッファは常にメモリ保護にかかっていることなるた
め、不正アクセス検出能力が向上する。
Furthermore, in the buffer capture request, when all the operation buffers are in use, the standby buffer is not captured, and a buffer capture failure is returned to the capture request source. Since the buffer being used is always protected by memory, the ability to detect unauthorized access is improved.

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

【図1】本発明を適用したシステムの一実施例を示す図
である。
FIG. 1 is a diagram showing one embodiment of a system to which the present invention is applied.

【図2】図1における運用空きバッファチェイン管理テ
ーブルの構成例を示す図である。
FIG. 2 is a diagram showing a configuration example of an operation free buffer chain management table in FIG. 1;

【図3】図1における待機空きバッファチェイン管理テ
ーブルの構成例を示す図である。
FIG. 3 is a diagram showing a configuration example of a standby free buffer chain management table in FIG. 1;

【図4】図1におけるバッファ管理テーブルの具体的構
成例を示す図である。
FIG. 4 is a diagram showing a specific configuration example of a buffer management table in FIG. 1;

【図5】図1におけるバッファ領域の具体的構成例を示
す図である。
FIG. 5 is a diagram showing a specific configuration example of a buffer area in FIG. 1;

【図6】図1におけるバッファ管理情報初期設定部の処
理フローを示す図である。
FIG. 6 is a diagram showing a processing flow of a buffer management information initial setting unit in FIG. 1;

【図7】バッファ管理情報初期設定処理が実行された後
の各管理テーブルとバッファ領域の具体的構成例を示す
図である。
FIG. 7 is a diagram illustrating a specific configuration example of each management table and a buffer area after a buffer management information initial setting process is executed.

【図8】図1におけるバッファ捕捉部の処理フローを示
す図である。
FIG. 8 is a diagram showing a processing flow of a buffer capturing unit in FIG. 1;

【図9】バッファ捕捉処理が実行された後の各管理テー
ブルとバッファ領域の具体的構成例を示す図である。
FIG. 9 is a diagram illustrating a specific configuration example of each management table and a buffer area after a buffer capturing process is executed.

【図10】図1におけるバッファ解放部の処理フローを
示す図である。
FIG. 10 is a diagram showing a processing flow of a buffer release unit in FIG. 1;

【図11】バッファ解放処理が実行された後の、各管理
テーブルとバッファ領域の具体的構成例を示す図であ
る。
FIG. 11 is a diagram illustrating a specific configuration example of each management table and a buffer area after a buffer release process is performed.

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

101 ホストコンピュータ 102 端末装置 104 通信制御部 105 バッファ捕捉部 106 バッファ解放部 107 バッファ管理情報初期設定部 109 運用空きバッファチェイン管理テーブル 110 待機空きバッファチェイン管理テーブル 111 バッファ管理テーブル 112 バッファ領域 400〜406 バッファ管理テーブル 500〜506 バッファ DESCRIPTION OF SYMBOLS 101 Host computer 102 Terminal device 104 Communication control unit 105 Buffer capture unit 106 Buffer release unit 107 Buffer management information initial setting unit 109 Operation free buffer chain management table 110 Standby free buffer chain management table 111 Buffer management table 112 Buffer area 400 to 406 Buffer Management table 500-506 buffer

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 空きバッファをチェイン状にリンクして
管理する空きバッファ管理方法であって、 複数のバッファから構成される連続したバッファ領域
を、優先的に使用する運用バッファと、該運用バッファ
が全て使用されているときに使用する待機バッファとに
分割し、かつ、運用バッファと待機バッファとがアドレ
ス的に交互に出現するように分割して、運用バッファチ
ェインと待機バッファチェインのそれぞれのバッファチ
ェインを組み、 運用バッファチェインと待機バッファチェインのどちら
かにつながれているバッファにメモリ保護を設定してお
き、 バッファ捕捉要求に伴うどちらかのバッファチェインか
らのとりはずし時に、捕捉するバッファのメモリ保護を
解除し、 バッファ解放要求に伴うどちらかのバッファチェインへ
のつなぎこみ時に、解放するバッファのメモリ保護を設
定する、ことを特徴とする空きバッファ管理方法。
1. An empty buffer management method for managing empty buffers by linking them in a chain, comprising: an operation buffer that preferentially uses a continuous buffer area composed of a plurality of buffers; The buffer buffer is divided into a standby buffer used when all the buffers are used, and the active buffer and the standby buffer are divided so that they alternately appear in address. And set the memory protection to the buffer connected to either the active buffer chain or the standby buffer chain, and release the memory protection of the buffer to be captured when removing from one of the buffer chains due to the buffer capture request The buffer release request to either of the buffer chains. During Nagikomi, it sets the memory protection buffer to release the free buffer management method characterized by.
【請求項2】 請求項1記載の空きバッファ管理方法に
おいて、バッファ解放要求に伴うバッファチェインへの
つなぎこみ時に、解放するバッファ内の任意のメモリの
内容を読み出し、該内容を再び同一メモリに書き込んで
から、メモリ保護を設定することを特徴とする空きバッ
ファ管理方法。
2. The free buffer management method according to claim 1, wherein at the time of connection to a buffer chain in response to a buffer release request, the contents of an arbitrary memory in the buffer to be released are read and the contents are written back to the same memory. Then, a free buffer management method characterized by setting memory protection.
【請求項3】 請求項1、2記載の空きバッファ管理方
法において、運用バッファが全て使用中の時は、待機バ
ッファの捕捉は行なわずに、捕捉要求元にバッファ捕捉
失敗を返却することを特徴とする空きバッファ管理方
法。
3. The free buffer management method according to claim 1, wherein when all of the operation buffers are in use, a buffer capture failure is returned to the capture request source without capturing the standby buffer. Free buffer management method.
JP28019299A 1999-09-30 1999-09-30 Free buffer management method Expired - Fee Related JP3660173B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28019299A JP3660173B2 (en) 1999-09-30 1999-09-30 Free buffer management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28019299A JP3660173B2 (en) 1999-09-30 1999-09-30 Free buffer management method

Publications (2)

Publication Number Publication Date
JP2001101080A true JP2001101080A (en) 2001-04-13
JP3660173B2 JP3660173B2 (en) 2005-06-15

Family

ID=17621593

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28019299A Expired - Fee Related JP3660173B2 (en) 1999-09-30 1999-09-30 Free buffer management method

Country Status (1)

Country Link
JP (1) JP3660173B2 (en)

Also Published As

Publication number Publication date
JP3660173B2 (en) 2005-06-15

Similar Documents

Publication Publication Date Title
US6081664A (en) Method for monitoring a BIOS
US7975260B1 (en) Method of direct access and manipulation of debuggee memory from debugger
US7185148B2 (en) Read access and storage circuitry read allocation applicable to a cache
US20050102578A1 (en) System and method for capturing kernel-resident information
MX2007002204A (en) Apparatus, system, and method for file system serialization reinitialization.
US6658519B1 (en) Bus bridge with embedded input/output (I/O) and transaction tracing capabilities
US5701486A (en) Tracing technique for application programs using protect mode addressing
JP5392263B2 (en) Information processing apparatus and memory protection method thereof
US6944792B2 (en) Method for verifying user memory validity in operating system
JP3660173B2 (en) Free buffer management method
JPH11212836A (en) Fault processing method, execution device for the same and medium recording processing program for the same
JPS60502073A (en) Circuit device that combines one-chip microprocessor
JP3364751B2 (en) Data transfer system
JP3273191B2 (en) Data transfer device
JP2825589B2 (en) Bus control method
JPH09146903A (en) Data transfer control method for parallel computer
JPH07122857B2 (en) Information processing equipment
JPH09282291A (en) System and method for canceling lock flag of common storage device
JP2919457B1 (en) Duplexing device I / O control method and program recording medium therefor
JP2830293B2 (en) Program execution method
JP2001154860A (en) Memory managing method for operating system
JPH10143444A (en) Fault processing system
JPH11212858A (en) Method and device for managing memory pool area
JPH01300365A (en) Exclusive control system for multi-processor system
JP2000330804A (en) Method for protecting data in built-in system and computer readable recording medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050310

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050315

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050316

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080325

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110325

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140325

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees