JPS63177234A - File save loading method - Google Patents

File save loading method

Info

Publication number
JPS63177234A
JPS63177234A JP62010274A JP1027487A JPS63177234A JP S63177234 A JPS63177234 A JP S63177234A JP 62010274 A JP62010274 A JP 62010274A JP 1027487 A JP1027487 A JP 1027487A JP S63177234 A JPS63177234 A JP S63177234A
Authority
JP
Japan
Prior art keywords
memory
address
data
file
allocated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP62010274A
Other languages
Japanese (ja)
Inventor
Naoto Ichihara
直人 市原
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 JP62010274A priority Critical patent/JPS63177234A/en
Publication of JPS63177234A publication Critical patent/JPS63177234A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To actuate a file save loading action for the entire data structure where the interrelationship is expressed via the address pointer type data at a high speed and with no dependence on the data structure, by using a structure definition table and a memory control table. CONSTITUTION:Both a structure definition table and a memory control table are read at first and the memories are allocated according to the memory sizes described in the memory control table. At the same time, the head address value of the control table is set at the value obtained in the previous tape state and then the memory address allocated this time is set as the head address. This processing is carried out with all memory allocating information on the control table. Then the data entering an actual memory area is read out for each block and written into the corresponding areas in the order of control tables. The type of the data structure is obtained from the control table and the position of the address pointer type data is obtained. Thus the desired address value is obtained.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はファイルセーブ・ロード方法、特にメモリ上に
展開されたデータの補助記憶装置へのアドレスポインタ
型のデータのファイルセーブロード方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a file saving/loading method, and particularly to a file saving/loading method of address pointer type data to an auxiliary storage device for data developed on a memory.

〔技術環境〕[Technological environment]

近年のソフトウェア言語では、データ間の関係を表現す
るのにアドレスポインタ型データを使うものが普及して
お)、特にC言語では多用される傾向にある。また、扱
うデータの量に自由度をもたせるための動的なメモリ割
当てが一般的にな択従来の単純なテーブルダンプ方式の
ファイルセーブ・ロード方式では対応できないデータ構
造が増え、これらのアドレスポインタ型データ及び動的
メモリ割当てデータを効率よく、高速にファイルにセー
ブし、ファイルからロードする方法が必要となっている
In recent years, software languages that use address pointer type data to express relationships between data have become popular, and C language in particular tends to use them frequently. In addition, dynamic memory allocation is common in order to have more flexibility in handling the amount of data, and the number of data structures that cannot be handled by the conventional simple table dump file save/load method has increased, and these address pointer types Data and Dynamic Memory Allocation There is a need for an efficient and fast way to save data to and load data from files.

〔従来の技術〕[Conventional technology]

従来のファイルセーブ方法では、プログラム実行時に決
まるアドレス等のデータは、ファイルセーブの対象から
はずすか、一旦配列のインデックス等の別な形に変えて
ファイルにセーブし、ロード時に再変換する方法がある
In conventional file saving methods, data such as addresses determined at the time of program execution are either excluded from the file saving target, or are converted to another format such as an array index, saved to a file, and reconverted when loaded. .

上述した2つの方法のうち、前者は、ファイルセーブ対
象になるデータ構造の中で、アドレスポインタ型データ
が使えないため、データの表現方法に制約ができて、プ
ログラムの効率を落とすという欠点があった。後者は、
ファイルのセーブ自ロード時に無駄な処理時間がかかる
欠点がある。
Of the two methods mentioned above, the former has the disadvantage that address pointer type data cannot be used in the data structure to be saved as a file, which imposes restrictions on the data representation method and reduces program efficiency. Ta. The latter is
It has the disadvantage that it takes wasted processing time when saving and self-loading files.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のファイル・セーブロード方法は、各種構造体の
メモリサイズ及び該構造体内にアドレスポインタ型デー
タが存在する場合のアドレスポインタ型データの構造体
の先頭からのオフセットアドレスを定義した構造体定義
テーブルと、各構造体を実際にメモリ割当てした時のメ
モリの先頭アドレス、前回のセーブ時に割当られていた
例の先頭アドレス割当てられた連続メモリエリアのサイ
ズ及び構造体の種別を記述したメモリ管理テーブルを持
ち、ファイルへのセーブを前記2種類のテーブル及び実
際に割当てられたメモリエリア単位にバイナリデータで
行ない、ファイルからのロード時は、前記2種類のテー
ブルを読み込んだ後、メモリ管理テーブルに記述された
メモリサイズに従って新たにメモリ割当てを行なった後
、各メモリエリア単位のファイルデータを新たに割当て
られたメモリエリアに読み込み、構造体定義テーブルに
記述されたアドレスポインタ型データ部分の値を新しく
割当てられたメモリのアドレス値に変換する事を特徴と
する。
The file save/load method of the present invention uses a structure definition table that defines the memory size of various structures and the offset address from the beginning of the structure for address pointer type data when address pointer type data exists in the structure. and a memory management table that describes the memory start address when each structure was actually allocated, the size of the contiguous memory area allocated to the start address in the example that was allocated at the time of the previous save, and the type of structure. The file is saved as binary data for each of the above two types of tables and the memory area actually allocated, and when loading from a file, after reading the above two types of tables, the data is written in the memory management table. After allocating new memory according to the memory size, the file data for each memory area is read into the newly allocated memory area, and the value of the address pointer type data part written in the structure definition table is newly allocated. It is characterized by converting it into a memory address value.

〔実施例〕〔Example〕

次に、本発明の実施例について、図面を参照して詳細に
説明する。
Next, embodiments of the present invention will be described in detail with reference to the drawings.

第1図は、本発明の一実施例のテーブル構成図である。FIG. 1 is a table configuration diagram of an embodiment of the present invention.

テーブル1は各種構造体のメモリサイズ、アドレスポイ
ンタ型データのオフセット位置情報を含む構造体定義テ
ーブルである。1つの構造体の中に存在するアドレスポ
インタ型データが複数でも対応できる構造とする。テー
ブル2は、実際にメモリ割当てされた連続領域ごとの構
造体種別、連続領域のメモリサイズ、先頭アドレス、前
回ファイルセーブされた時、割当てられていた時のアド
レスを含むメモリ管理テーブルである。動的メモリ割当
て領域3は、各構造体種別ごとのデータが格応される領
域で、構造体のメモリサイズの整数倍のサイズをもって
いる。同一構造体が複数の動的メモリ割当て領域を持つ
事も可能である。
Table 1 is a structure definition table that includes memory sizes of various structures and offset position information of address pointer type data. The structure is such that it can accommodate multiple pieces of address pointer type data that exist in one structure. Table 2 is a memory management table that includes the structure type for each contiguous area to which memory is actually allocated, the memory size of the contiguous area, the start address, and the address when the file was last saved and allocated. The dynamic memory allocation area 3 is an area where data for each structure type is stored, and has a size that is an integral multiple of the memory size of the structure. It is also possible for the same structure to have multiple dynamic memory allocation areas.

第2図は、ファイルセーブされた時のファイルのレコー
ド構成図である。第1図の各テーブル、メモリ領域が、
シーケンシャルにファイルにセーブされる。ファイルセ
ーブ時は各テーブルの内容には、処理を加えない。
FIG. 2 is a record configuration diagram of a file when the file is saved. Each table and memory area in Figure 1 is
Saved sequentially to a file. When saving a file, no processing is performed on the contents of each table.

第3図は、ファイルからデータをロードする時のフロー
チャートである。最初に構造体定義テーブルとメそり管
理テーブルを読み込み、メモリ管理テーブルに記述され
ているメモリサイズに従って、メモリの割当てを行なう
と同時に、該テーブルの先頭アドレスの値を前回セーブ
時の値にセットした後、今回割当てたメモリアドレスを
先頭アドレスとしてセットする。この処理をメモリ管理
テーブルに記述されている全てのメモリ割当て情報につ
いて実施する。その後、ファイルよシ、実際のメモリ領
域に入るデータを1ブロツクごとに読み出し、メモリ管
理テーブル順に対応する領域に書き込む。各、メモリ領
域ごとにその中のデータの構造体種別をメモリ管理テー
ブルよシ求め、その中のアドレスポインタ型データの位
置を知シ、その値Aを求める。Aは、ファイルセーブ時
点でのアドレス値のため、メモリ管理テーブルの前回セ
ーブ時点のアドレスBと、連続メモリ割当てすイズCか
ら B<、AくB+Cを満たすテーブルを捜し、現在の
メモリ割当て先頭アドレスDを求める、新しいアドレス
ポインタ型データ値をA−B+Dの値に再セットする。
FIG. 3 is a flowchart when loading data from a file. First read the structure definition table and memory management table, allocate memory according to the memory size described in the memory management table, and at the same time set the value of the start address of the table to the value at the time of the last save. After that, set the memory address allocated this time as the start address. This process is performed for all memory allocation information written in the memory management table. Thereafter, the data stored in the file and the actual memory area is read block by block and written to the corresponding area in the order of the memory management table. For each memory area, the structure type of data therein is determined from a memory management table, the position of address pointer type data therein is determined, and its value A is determined. Since A is the address value at the time of saving the file, from the address B of the memory management table at the time of the previous save and the continuous memory allocation size C, search for a table that satisfies B<, A B + C, and find the current memory allocation start address. Find D and reset the new address pointer type data value to the value of A-B+D.

本処理を全メモリ領域のアドレスポインタ型データに対
して施す。アドレスポインタ値の変更処理にあたっては
、メモリ管理テーブルを前回セーブ時のアドレスに従っ
てソートし、バイナリサーチを用いて、所望するアドレ
ス値を得る。
This process is applied to address pointer type data in all memory areas. In the process of changing the address pointer value, the memory management table is sorted according to the address at the time of the previous save, and a desired address value is obtained using binary search.

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

本発明のファイルセーブ・ロード方法は、構造体定義テ
ーブル及びメモリ管理テーブルを設けることにより、ア
ドレスポインタ型データを用いて相互関係を表現したデ
ータ構造全体を高速にファイルセーブ・ロードできるう
えに、データ構造に依存しないという効果がある。
By providing a structure definition table and a memory management table, the file saving/loading method of the present invention allows the entire data structure that expresses mutual relationships using address pointer type data to be saved and loaded at high speed. It has the effect of not depending on the structure.

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

第1図は本発明の一実施例を示すテーブル構成図、第2
図は、ファイルセーブ時のファイルのレコード構成図、
第3図はファイルからのロード時のフローチャートであ
る。 a詣11本足義テープ)ν C動台ケノ(す濃p樋で4唄jk 術 1 回 箔2図 yf!J3図 ファイルロー ド時の7aチ7−ト
FIG. 1 is a table configuration diagram showing an embodiment of the present invention, and FIG.
The figure shows the record structure of the file when saving the file.
FIG. 3 is a flowchart when loading from a file. a pilgrimage 11 legs prosthetic tape) ν C Dodaikeno (Suno phi de 4 songs jk technique 1 time foil 2 figures yf! J3 figure 7a cheat 7-t when loading the file

Claims (1)

【特許請求の範囲】[Claims] 各種構造体のメモリサイズ及び該構造体内にアドレスポ
インタ型データが存在する場合のアドレスポインタ型デ
ータの構造体の先頭からのオフセットアドレスを定義し
た構造体定義テーブルと各構造体を実際にメモリ割当て
した時のメモリの先頭アドレス、前回のセーブ時に割当
られていたメモリの先頭アドレス、割当てられた連続メ
モリエリアのサイズ及び構造体種別を記述したメモリ管
理テーブルを持ち、ファイルへのセーブを前記2種類の
テーブル及び実際に割当てられたメモリ・エリア単位に
バイナリデータで行ない、ファイルからのロード時は前
記2種類のテーブルを読込んだ後メモリ管理テーブルに
記述されたメモリサイズに従って、新たにメモリ割当て
を行なった後、各メモリエリア単位のファイルデータを
新たに割当てられたメモリエリアに読み、構造体定義テ
ーブルに記述されたアドレスポインタ型データ部分の値
を新しく割当てられたメモリエリアのアドレスに基づく
値に変更し各構造体間のアドレス参照関係を再構成する
事を特徴とするファイルセーブ・ロード方法。
A structure definition table that defines the memory size of various structures and the offset address from the beginning of the structure for address pointer type data when address pointer type data exists in the structure, and the actual memory allocation for each structure. It has a memory management table that describes the start address of the memory at the time, the start address of the memory allocated at the time of the previous save, the size of the allocated contiguous memory area, and the structure type. Binary data is used for each table and memory area actually allocated. When loading from a file, after reading the above two types of tables, new memory allocation is performed according to the memory size described in the memory management table. After that, the file data for each memory area is read into the newly allocated memory area, and the value of the address pointer type data part written in the structure definition table is changed to a value based on the address of the newly allocated memory area. A file saving/loading method characterized by reconfiguring the address reference relationships between each structure.
JP62010274A 1987-01-19 1987-01-19 File save loading method Pending JPS63177234A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62010274A JPS63177234A (en) 1987-01-19 1987-01-19 File save loading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62010274A JPS63177234A (en) 1987-01-19 1987-01-19 File save loading method

Publications (1)

Publication Number Publication Date
JPS63177234A true JPS63177234A (en) 1988-07-21

Family

ID=11745734

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62010274A Pending JPS63177234A (en) 1987-01-19 1987-01-19 File save loading method

Country Status (1)

Country Link
JP (1) JPS63177234A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009525056A (en) * 2005-04-11 2009-07-09 スターバックス・コーポレイション Beverage extraction device for coffee and the like and beverage extraction method
US9402406B2 (en) 2005-04-11 2016-08-02 Starbucks Corporation Beverage brewer with flavor base removal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009525056A (en) * 2005-04-11 2009-07-09 スターバックス・コーポレイション Beverage extraction device for coffee and the like and beverage extraction method
US9402406B2 (en) 2005-04-11 2016-08-02 Starbucks Corporation Beverage brewer with flavor base removal
US10667642B2 (en) 2005-09-20 2020-06-02 Starbucks Corporation Machine for brewing a beverage such as coffee and related method

Similar Documents

Publication Publication Date Title
JPS6027964A (en) Memory access control circuit
US20050055532A1 (en) Method for efficiently controlling read/write of flash memory
US10649967B2 (en) Memory object pool use in a distributed index and query system
JPS63177234A (en) File save loading method
JPH08101783A (en) File system
JPH0247735A (en) Computer device
JP2605476B2 (en) Dump collection processing method
JP2507399B2 (en) Database equipment
JPS62167695A (en) Memory writing method
JPH07141112A (en) External memory control unit
JPH06149647A (en) Multi-media file managing system
JPH04112245A (en) Method for making file structure virtual
JP2002544619A (en) Object-oriented processing using dedicated pointer memory
JPS63213043A (en) File processing system for external memory
JPS6089256A (en) File controller
JPH03260870A (en) Projection system for data base assist
JPS63192126A (en) Processing system for space control of data set
JPH04287245A (en) System for managing free area of file system
JPS62236049A (en) File constitution system
JPH0795297B2 (en) File access controller
JPS6358555A (en) Control system for file space
JPS6228849A (en) Storage control system for information storage device
JPH02138645A (en) Processing system for input order file
JPH0721749B2 (en) File storage method, file reading method and file editing method
JPS5924344A (en) Overlay controlling system