JP2012247908A - Memory arrangement management device, memory arrangement management method, memory arrangement management program, and program generation system - Google Patents

Memory arrangement management device, memory arrangement management method, memory arrangement management program, and program generation system Download PDF

Info

Publication number
JP2012247908A
JP2012247908A JP2011117975A JP2011117975A JP2012247908A JP 2012247908 A JP2012247908 A JP 2012247908A JP 2011117975 A JP2011117975 A JP 2011117975A JP 2011117975 A JP2011117975 A JP 2011117975A JP 2012247908 A JP2012247908 A JP 2012247908A
Authority
JP
Japan
Prior art keywords
object code
segments
change
segment
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.)
Granted
Application number
JP2011117975A
Other languages
Japanese (ja)
Other versions
JP5660386B2 (en
Inventor
Shotaro Kono
正太郎 河野
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 JP2011117975A priority Critical patent/JP5660386B2/en
Publication of JP2012247908A publication Critical patent/JP2012247908A/en
Application granted granted Critical
Publication of JP5660386B2 publication Critical patent/JP5660386B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

PROBLEM TO BE SOLVED: To minimize correction of an address of an object code in arranging memory even when the size of the object code is changed by changing the code.SOLUTION: A memory arrangement management device includes a memory arrangement management table, a management table update part, and a setup file generation part. The management table update part calculates the number of segments assigned to a post-change object code using an object size of a post-update object code when the object code is updated, and moves the post-change object code to a segment having spare zones of the number of the post-change segments or more if the number of the post-change segments is larger than that of the pre-change segments, or if vice versa, updates the memory arrangement management table so as to accommodate the post-change object code in the pre-change segments.

Description

本発明は、メモリ配置管理装置、メモリ配置管理方法、メモリ配置管理プログラム、およびプログラム作成システムに関し、特にOS(Operating System:オペレーティングシステム)のオブジェクトコードのメモリ配置を管理するメモリ配置管理装置、メモリ配置管理方法、メモリ配置管理プログラム、およびプログラム作成システムに関する。   The present invention relates to a memory allocation management device, a memory allocation management method, a memory allocation management program, and a program creation system, and more particularly to a memory allocation management device that manages the memory allocation of an object code of an OS (Operating System), and a memory allocation The present invention relates to a management method, a memory allocation management program, and a program creation system.

OSの障害解析のための情報採取方法として、OSの処理に、その障害解析のための情報採取処理(以下、「プローブ」とも呼ぶ。)を埋め込む方法がある。この方法に関連する技術について、図5を参照して説明する。   As an information collection method for OS failure analysis, there is a method of embedding information collection processing for failure analysis (hereinafter also referred to as “probe”) in the OS processing. A technique related to this method will be described with reference to FIG.

図5に示す関連技術に係る方法では、コンピュータ100によるOS101の処理でその障害解析のための情報採取処理が必要な箇所(プローブ)に、あらかじめNOP(No Operation)命令を埋め込んでおく。そして、USB(Universal Serial Bus)メモリ等の外部記憶媒体110をコンピュータ100に挿入することを契機に、解析プログラム102が以下の処理をコンピュータに実行させることにより、情報採取が行われる。   In the method according to the related art shown in FIG. 5, a NOP (No Operation) instruction is embedded in advance in a portion (probe) where information collection processing for failure analysis is necessary in the processing of the OS 101 by the computer 100. Then, when an external storage medium 110 such as a USB (Universal Serial Bus) memory is inserted into the computer 100, the analysis program 102 causes the computer to execute the following processing to collect information.

(1)インタプリタ103が、外部記憶媒体上の解析スクリプトに記載されているプローブアドレス、情報採取処理のアドレス、情報採取処理を読み込む。   (1) The interpreter 103 reads the probe address, the information collection processing address, and the information collection processing described in the analysis script on the external storage medium.

(2)情報採取処理を、パッチ領域に書き込む。   (2) The information collection process is written in the patch area.

(3)プローブ箇所のNOP命令を、情報採取処理のアドレスへのブランチ(分岐)命令に変更する。   (3) The NOP instruction at the probe location is changed to a branch instruction to the address for information collection processing.

次に、解析プログラム102の上記処理が完了した後の、情報採取の流れを以下に示す。   Next, the flow of information collection after the above processing of the analysis program 102 is completed is shown below.

(4)OS101の処理がプローブアドレスまでくると、ブランチ命令に従い、パッチ領域の情報採取処理へブランチする。   (4) When the processing of the OS 101 reaches the probe address, branch to the patch area information collection processing according to the branch instruction.

(5)情報採取処理が実行され、ログ出力処理が呼び出される。   (5) Information collection processing is executed, and log output processing is called.

(6)ログ出力処理が実行され、(5)の情報採取処理で採取した情報が外部記憶媒体上のログファイル112に出力される。   (6) The log output process is executed, and the information collected by the information collection process of (5) is output to the log file 112 on the external storage medium.

このように、通常運用時はプローブをNOP命令にしておき、情報採取時のみ情報採取処理へのブランチ命令に変更することで、通常運用時のオーバヘッドを抑えることができる。   Thus, the overhead during normal operation can be suppressed by changing the probe to the NOP instruction during normal operation and changing to a branch instruction for information collection processing only during information collection.

上記の関連技術に係る方法では、外部記憶媒体上の解析スクリプトに記載されているプローブアドレスは、マップファイルおよび逆アセンブルファイルの情報を元に計算する。マップファイルは、オブジェクトファイルのリンク時に生成されるファイルで、オブジェクトコードの先頭アドレスを特定できるものである。逆アセンブルファイルは、オブジェクトファイルを逆アセンブルすることにより生成されるファイルで、オブジェクトコードの先頭アドレスからの相対アドレスを特定できるものである。   In the method according to the related technique, the probe address described in the analysis script on the external storage medium is calculated based on the information of the map file and the disassemble file. The map file is a file generated when linking object files, and can specify the start address of the object code. The disassemble file is a file generated by disassembling the object file, and can specify a relative address from the start address of the object code.

この場合、バージョンアップ等でOSのソースコードを修正すると、これに対応するオブジェクトコードが変わってしまうため、解析スクリプトに記載されているプローブアドレスを修正する必要がある。   In this case, if the OS source code is modified due to version upgrade or the like, the corresponding object code is changed. Therefore, it is necessary to modify the probe address described in the analysis script.

上記に関連して、特許文献1には、複数のオブジェクトモジュールを結合して1つの実行可能プログラムを生成するリンカ装置において、複数のオブジェクトモジュールの配置対象セグメント毎に所定サイズの空き領域を割り当て、オブジェクトモジュールの変更があった配置対象セグメントのみを再度リンクし、その対象配置セグメントの終わりに所定サイズの空き領域を付加するものが記載されている。   In relation to the above, Patent Document 1 allocates a free space of a predetermined size for each target segment of a plurality of object modules in a linker device that combines a plurality of object modules to generate one executable program, There is a description in which only an arrangement target segment whose object module has been changed is linked again, and an empty area of a predetermined size is added to the end of the target arrangement segment.

特開2000−155673号公報JP 2000-155673 A

上記の関連技術に係る方法では、バージョンアップ等でOSのソースコードを修正した場合、修正したソースコードに対応するオブジェクトコードのサイズが変わることにより、メモリ配置が変わる。このため、プローブのアドレスが変わってしまい、解析スクリプトに記載したプローブアドレスを大幅に修正する必要が生じる。この例を図6(a)、(b)に示す。   In the method according to the related art described above, when the OS source code is modified by version upgrade or the like, the memory arrangement is changed by changing the size of the object code corresponding to the modified source code. For this reason, the probe address changes, and it becomes necessary to significantly correct the probe address described in the analysis script. This example is shown in FIGS. 6 (a) and 6 (b).

図6(a)、(b)の例では、オブジェクト名がオブジェクト1のオブジェクトコードのサイズと、オブジェクト名がオブジェクト2のオブジェクトコードのサイズとがいずれも大きくなったことにより、変更のないオブジェクト名がオブジェクト3のオブジェクトコード内のプローブのアドレスが変わっている。さらに、オブジェクト名がオブジェクト3のオブジェクトコードより高位のアドレスにプローブが埋め込まれていた場合、すべてのプローブのアドレスが変わってしまう。   In the example of FIGS. 6A and 6B, the object name that has not been changed because the object code size of the object 1 and the object code size of the object 2 are both increased. However, the address of the probe in the object code of object 3 has changed. Furthermore, when the probe is embedded at an address whose object name is higher than the object code of the object 3, the addresses of all the probes are changed.

一方、特許文献1に記載のリンカ装置は、コードサイズの比率等を用いて、ユーザまたはシステムが空き領域のサイズを指定するため、空き領域の指定が必要となる。   On the other hand, in the linker device described in Patent Document 1, since the user or the system specifies the size of the free area using the code size ratio or the like, it is necessary to specify the free area.

本発明の目的は、上記課題を解決し、オブジェクトコードの変更によりそのサイズが変わる場合でも、メモリ配置上のオブジェクトコードのアドレスの修正を最小限にできるメモリ配置管理装置、メモリ配置管理方法、メモリ配置管理プログラム、およびプログラム作成システムを提供することにある。   An object of the present invention is to solve the above-mentioned problems, and even when the size of the object code is changed by changing the object code, a memory arrangement management device, a memory arrangement management method, and a memory capable of minimizing the correction of the address of the object code on the memory arrangement An object is to provide an arrangement management program and a program creation system.

本発明の第1の観点によれば、メモリ領域を予め設定された固定長サイズのセグメントに分割し、分割したセグメントにオブジェクトコードを割り当てて配置したときの当該オブジェクトコードが割り当てられたセグメントの先頭セグメント番号およびセグメント数を、当該オブジェクトコードが割り当てられていない空き領域となるセグメントの先頭セグメント番号およびセグメント数と共に管理するメモリ配置管理テーブルと、前記オブジェクトコードが更新される際、更新後のオブジェクトコードのオブジェクトサイズから変更後のオブジェクトコードに割り当てられるセグメントのセグメント数を計算し、変更後のセグメント数が変更前のセグメント数よりも大きいとき、変更後のオブジェクトコードを変更後のセグメント数以上の空き領域となるセグメントに移動し、変更後のセグメント数が変更前のセグメント数以下のとき、変更後のオブジェクトコードをその変更前のセグメント内に収めるように前記メモリ配置管理テーブルを更新する管理テーブル更新部と、更新された前記メモリ配置管理テーブルから、前記オブジェクトコードのメモリ配置を設定するためのオブジェクトアドレスを含むメモリ配置設定ファイルを生成する設定ファイル生成部とを有することを特徴とするメモリ配置管理装置が提供される。   According to the first aspect of the present invention, when a memory area is divided into predetermined fixed-size segments, and an object code is allocated to the divided segment and arranged, the start of the segment to which the object code is allocated A memory allocation management table that manages the segment number and the number of segments together with the first segment number and the number of segments of the segment that is an empty area to which the object code is not assigned, and the updated object code when the object code is updated The number of segments allocated to the object code after change is calculated from the object size of the object, and when the number of segments after change is greater than the number of segments before change, the object code after change is greater than or equal to the number of segments after change. Management table that moves to the segment that will be the storage area and updates the memory allocation management table so that the object code after the change is contained in the segment before the change when the number of segments after the change is less than or equal to the number of segments before the change A memory arrangement comprising: an update unit; and a setting file generation unit that generates a memory arrangement setting file including an object address for setting the memory arrangement of the object code from the updated memory arrangement management table A management device is provided.

本発明の第2の観点によれば、メモリ配置管理テーブルが、メモリ領域を固定長サイズのセグメントに分割し、分割したセグメントにオブジェクトコードを割り当てて配置したときの当該オブジェクトコードが割り当てられたセグメントの先頭セグメント番号およびセグメント数を、当該オブジェクトコードが割り当てられていない空き領域となるセグメントの先頭セグメント番号およびセグメント数と共に管理し、管理テーブル更新部が、前記オブジェクトコードが更新される際、更新後のオブジェクトコードのオブジェクトサイズから変更後のオブジェクトコードに割り当てられるセグメントのセグメント数を計算し、変更後のセグメント数が変更前のセグメント数よりも大きいとき、変更後のオブジェクトコードを変更後のセグメント数以上の空き領域となるセグメントに移動し、変更後のセグメント数が変更前のセグメント数以下のとき、変更後のオブジェクトコードをその変更前のセグメント内に収めるように前記メモリ配置管理テーブルを更新し、設定ファイル生成部が、更新された前記メモリ配置管理テーブルから、前記オブジェクトコードのメモリ配置を設定するためのオブジェクトアドレスを含むメモリ配置設定ファイルを生成することを特徴とするメモリ配置管理方法が提供される。   According to the second aspect of the present invention, the memory allocation management table divides the memory area into segments of a fixed length size, and assigns the object code to the divided segment and allocates the segment to which the object code is allocated. The first segment number and the number of segments are managed together with the first segment number and the number of segments of an empty area to which the object code is not assigned, and the management table update unit updates the object code when the object code is updated. When the number of segments allocated to the object code after change is calculated from the object size of the object code of, and the number of segments after change is larger than the number of segments before change, the changed object code is changed to the segment after change When the number of segments after the change is less than or equal to the number of segments before the change, the memory allocation management table is updated so that the object code after the change is stored in the segment before the change. A memory location management method is provided, wherein the configuration file generation unit generates a memory location setting file including an object address for setting the memory location of the object code from the updated memory location management table. Is done.

本発明の第3の観点によれば、コンピュータを、メモリ領域を固定長サイズのセグメントに分割し、分割したセグメントにオブジェクトコードを割り当てて配置したときの当該オブジェクトコードが割り当てられたセグメントの先頭セグメント番号およびセグメント数を、当該オブジェクトコードが割り当てられていない空き領域となるセグメントの先頭セグメント番号およびセグメント数と共に管理するメモリ配置管理テーブルと、前記オブジェクトコードが更新される際、更新後のオブジェクトコードのオブジェクトサイズから変更後のオブジェクトコードに割り当てられるセグメントのセグメント数を計算し、変更後のセグメント数が変更前のセグメント数よりも大きいとき、変更後のオブジェクトコードを変更後のセグメント数以上の空き領域となるセグメントに移動し、変更後のセグメント数が変更前のセグメント数以下のとき、変更後のオブジェクトコードをその変更前のセグメント内に収めるように前記メモリ配置管理テーブルを更新する管理テーブル更新部と、更新された前記メモリ配置管理テーブルから、前記オブジェクトコードのメモリ配置を設定するためのオブジェクトアドレスを含むメモリ配置設定ファイルを生成する設定ファイル生成部として機能させることを特徴とするメモリ配置管理プログラムが提供される。   According to the third aspect of the present invention, when a computer divides a memory area into segments of a fixed length size, and assigns object codes to the divided segments, the first segment of the segment to which the object code is assigned A memory allocation management table for managing the number and the number of segments together with the first segment number and the number of segments of a segment that is a free area to which the object code is not assigned, and when the object code is updated, the updated object code Calculate the number of segments allocated to the object code after change from the object size, and if the number of segments after change is greater than the number of segments before change, change the object code after change to the number of segments after change. A management table that moves to a segment that becomes an empty area and updates the memory allocation management table so that the object code after the change is stored in the segment before the change when the number of segments after the change is less than or equal to the number of segments before the change A memory arrangement that functions as an update unit and a setting file generation unit that generates a memory arrangement setting file including an object address for setting the memory arrangement of the object code from the updated memory arrangement management table A management program is provided.

本発明の第4の観点によれば、上記に記載のメモリ配置管理装置と、オブジェクトコードをリンクして実行ファイルを生成し、当該オブジェクトコードのリンク時に前記メモリ配置管理装置により生成されたメモリ配置設定ファイルを用いて前記オブジェクトコードのメモリ配置を設定するリンカとを有することを特徴とするプログラム作成システムが提供される。   According to a fourth aspect of the present invention, an execution file is generated by linking an object code with the memory arrangement management apparatus described above, and the memory arrangement generated by the memory arrangement management apparatus when the object code is linked There is provided a program creation system comprising a linker for setting a memory allocation of the object code using a setting file.

本発明によれば、オブジェクトコードの変更によりそのサイズが変わる場合でも、メモリ配置上のオブジェクトコードのアドレスの修正を最小限にできる。   According to the present invention, even when the size of the object code is changed by changing the object code, the correction of the address of the object code on the memory arrangement can be minimized.

本発明の実施の形態に係るメモリ配置管理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the memory arrangement management apparatus which concerns on embodiment of this invention. 図1に示すメモリ配置管理装置において、オブジェクトコード変更前後のメモリ配置管理テーブルを示す図である。FIG. 3 is a diagram showing a memory allocation management table before and after an object code change in the memory allocation management device shown in FIG. 1. 図1に示すメモリ配置管理装置の動作を示すフローチャートである。3 is a flowchart showing an operation of the memory arrangement management device shown in FIG. 1. 図1に示すメモリ配置管理装置を用いた場合のオブジェクトコード変更前後のメモリ配置を示す図である。It is a figure which shows the memory arrangement before and behind the object code change at the time of using the memory arrangement management apparatus shown in FIG. 関連技術に係るOSの障害解析のための情報採取方法を説明するブロック図である。It is a block diagram explaining the information collection method for the failure analysis of OS which concerns on related technology. 関連技術を用いた場合のオブジェクトコード変更前後のメモリ配置を示す図である。It is a figure which shows the memory arrangement | positioning before and after the object code change at the time of using related technology.

以下、本発明に係るメモリ配置管理装置、メモリ配置管理方法、メモリ配置管理プログラム、およびプログラム作成システムの実施の形態について、図面を参照して詳細に説明する。   Embodiments of a memory allocation management device, a memory allocation management method, a memory allocation management program, and a program creation system according to the present invention will be described below in detail with reference to the drawings.

図1は、本実施の形態に係るメモリ配置管理装置の構成を説明するものである。   FIG. 1 explains the configuration of the memory arrangement management apparatus according to the present embodiment.

図1に示すメモリ配置管理装置50は、コンパイラ10、リンカ20、逆アセンブラ40と共にプログラムの作成及び修正を行うシステム(プログラム作成システム)を構成し、プログラミング言語で記述されたソースコード1をコンパイラ10によりコンパイルしてオブジェクトファイル2を生成し、生成したオブジェクトファイル2をリンカ20によりリンクして実行ファイル3を生成する際に用いられる。具体的には、メモリ配置管理ツール5と、メモリ配置設定ファイル6とを含む。   The memory allocation management device 50 shown in FIG. 1 constitutes a system (program creation system) that creates and corrects a program together with the compiler 10, the linker 20, and the disassembler 40. The source code 1 described in a programming language is compiled into the compiler 10 Is used to generate an object file 2 and link the generated object file 2 with the linker 20 to generate an execution file 3. Specifically, a memory arrangement management tool 5 and a memory arrangement setting file 6 are included.

メモリ配置設定ファイル6は、オブジェクトコードのメモリ配置を設定するための全オブジェクトコードのオブジェクト名と、オブジェクトアドレスとを記載したファイルである。リンカ20は、オブジェクトファイル2のリンク時にメモリ配置設定ファイル6を参照して、オブジェクトコードのメモリ配置を設定する。このため、メモリ配置設定ファイル6は、リンカ20が指定するフォーマットにする必要がある。例えば、ARMプロセッサ向けのコンパイラRVCTを使用する場合、メモリ配置設定ファイル6は、「スキャッタローディング記述ファイル」のフォーマットにする必要がある。   The memory allocation setting file 6 is a file in which object names and object addresses of all object codes for setting the memory allocation of object codes are described. The linker 20 refers to the memory allocation setting file 6 when linking the object file 2 and sets the memory allocation of the object code. For this reason, the memory arrangement setting file 6 needs to be in a format designated by the linker 20. For example, when the compiler RVCT for the ARM processor is used, the memory allocation setting file 6 needs to be in the format of “scatter loading description file”.

メモリ配置管理ツール5は、メモリ領域を固定長サイズのセグメントに分割し、オブジェクトファイル2のオブジェクトコードをセグメント境界に割り当てて配置することにより、オブジェクトコードのメモリ配置を管理するためのツールである。   The memory allocation management tool 5 is a tool for managing the memory allocation of the object code by dividing the memory area into fixed-size segments and allocating the object code of the object file 2 to the segment boundary.

このメモリ配置管理ツール5は、ソースコード1を変更したときに、変更後のソースコード1に対応するオブジェクトファイル2を逆アセンブラ40により逆アセンブルして得られる、変更したオブジェクトコードの逆アセンブルリスト4の情報(オブジェクト名41、オブジェクトサイズ42)から、メモリ配置設定ファイル6を生成する。   When the source code 1 is changed, the memory allocation management tool 5 is obtained by disassembling the object file 2 corresponding to the changed source code 1 by the disassembler 40, and the disassemble list 4 of the changed object code. The memory arrangement setting file 6 is generated from the information (object name 41, object size 42).

具体的に、メモリ配置管理ツール5は、管理テーブル更新部51、設定ファイル生成部52、およびメモリ配置管理テーブル53を含む。   Specifically, the memory allocation management tool 5 includes a management table update unit 51, a setting file generation unit 52, and a memory allocation management table 53.

メモリ配置管理テーブル53は、図2(a)、(b)に示すように、メモリ領域を予め設定された固定長サイズのセグメントに分割し、分割したセグメントにオブジェクトコードを割り当てて配置したときのオブジェクトコードの「オブジェクト名」、オブジェクトコードが割り当てられるセグメントの「先頭セグメント番号」、オブジェクトコードに割り当てられたセグメントの「セグメント数」を管理するための表である。   As shown in FIGS. 2A and 2B, the memory allocation management table 53 divides the memory area into predetermined fixed-length segments and assigns and allocates object codes to the divided segments. It is a table for managing the “object name” of the object code, the “starting segment number” of the segment to which the object code is assigned, and the “number of segments” of the segment assigned to the object code.

具体的には、メモリ配置管理テーブル53は、オブジェクトコードが割り当てられたセグメントの場合、オブジェクトコードのオブジェクト名に対応付けて、先頭セグメント番号およびセグメント数を管理すると共に、空き領域となるセグメントの場合、オブジェクトコードのオブジェクト名をnullとし、nullに対応付けて、先頭セグメント番号およびセグメント数を管理する。   Specifically, in the case of a segment to which an object code is assigned, the memory allocation management table 53 manages the top segment number and the number of segments in association with the object name of the object code, and in the case of a segment that becomes a free area The object name of the object code is set to null, and the head segment number and the number of segments are managed in association with null.

管理テーブル更新部51は、オブジェクトコードが更新された際に、変更後のオブジェクトコードの逆アセンブルリスト4のオブジェクト名41およびオブジェクトサイズ42から、メモリ配置管理テーブル53のオブジェクト名、先頭セグメント番号、およびセグメント数を更新する。   When the object code is updated, the management table update unit 51 uses the object name 41 and the object segment of the memory allocation management table 53 from the object name 41 and the object size 42 of the disassembled list 4 of the changed object code, and Update the number of segments.

具体的には、管理テーブル更新部51は、更新後のオブジェクトコードのオブジェクトサイズから変更後のオブジェクトコードに割り当てられるセグメントのセグメント数を計算し、変更後のセグメント数が変更前のセグメント数よりも大きいとき、変更後のオブジェクトコードを変更後のセグメント数以上の空き領域となるセグメントに移動し、変更後のセグメント数が変更前のセグメント数以下のとき、変更後のオブジェクトコードをその変更前のセグメント内に収めるようにメモリ配置管理テーブル53を更新する。   Specifically, the management table update unit 51 calculates the number of segments allocated to the object code after the change from the object size of the object code after the update, and the number of segments after the change is greater than the number of segments before the change. When it is larger, the changed object code is moved to a segment that is more than the number of segments after the change, and when the number of segments after the change is less than or equal to the number of segments before the change, the changed object code is changed to The memory allocation management table 53 is updated so as to fit in the segment.

また、管理テーブル更新部51は、変更後のセグメント数が変更前のセグメント数より小さいとき、変更後のオブジェクトコードを、変更前のセグメントの内、先頭セグメントから変更後のセグメント数分のセグメントに収め、その残りのセグメントを空き領域とするようにメモリ配置管理テーブル53を更新する。   In addition, when the number of segments after the change is smaller than the number of segments before the change, the management table update unit 51 changes the object code after the change from the first segment to the number of segments after the change from the top segment. And the memory allocation management table 53 is updated so that the remaining segment is an empty area.

管理テーブル生成部52は、オブジェクトコードが更新された際に、メモリ配置管理テーブル53のオブジェクト名、先頭セグメント番号、およびセグメント数を参照して、メモリ配置設定ファイル6を生成する。   When the object code is updated, the management table generation unit 52 refers to the object name, the top segment number, and the number of segments in the memory allocation management table 53 and generates the memory allocation setting file 6.

次に、本実施の形態の動作について説明する。   Next, the operation of the present embodiment will be described.

図3は、オブジェクト名Aのオブジェクトコードを変更した時のメモリ配置管理テーブル53の更新処理を示すフローチャートである。以下、図3を参照して、オブジェクト名Aのオブジェクトコードが更新されたときの管理テーブル更新部51の動作について説明する。   FIG. 3 is a flowchart showing the update processing of the memory allocation management table 53 when the object code of the object name A is changed. Hereinafter, the operation of the management table updating unit 51 when the object code of the object name A is updated will be described with reference to FIG.

まず、管理テーブル更新部51は、メモリ配置管理テーブル53からオブジェクトコードのオブジェクト名がAに対応する行Tを検索し(ステップA1)、検索された行Tのセグメント数を取得して変数S1に代入する(ステップA2)。   First, the management table update unit 51 searches the memory allocation management table 53 for the row T corresponding to the object name of the object code A (step A1), acquires the number of segments of the searched row T, and stores it in the variable S1. Substitute (step A2).

次に、管理テーブル更新部51は、オブジェクトファイル2の逆アセンブルにより生成された逆アセンブルリスト4からオブジェクト名Aのオブジェクトコードのオブジェクトサイズ42を取得し(ステップA3)、取得したオブジェクトサイズ42から、オブジェクトコードの変更後のセグメント数を計算し、変数S2に代入する(ステップA4)。セグメント数は、逆アセンブルリスト4から取得したオブジェクトサイズ42を、あらかじめ定義したセグメントサイズで割ることによって計算することができる。   Next, the management table update unit 51 acquires the object size 42 of the object code of the object name A from the disassembly list 4 generated by the disassembly of the object file 2 (step A3), and from the acquired object size 42, The number of segments after the change of the object code is calculated and substituted into the variable S2 (step A4). The number of segments can be calculated by dividing the object size 42 acquired from the disassemble list 4 by a predefined segment size.

次に、管理テーブル更新部51は、S1<S2か否か判定し(ステップA5)、その結果、S1<S2の場合(変更後のオブジェクトコードのセグメント数が行Tのセグメント数より大きい場合)(ステップA5:Yes)、以下の処理を行う。   Next, the management table updating unit 51 determines whether or not S1 <S2 (step A5). As a result, when S1 <S2 (when the number of segments of the object code after the change is larger than the number of segments in row T) (Step A5: Yes), the following processing is performed.

すなわち、管理テーブル更新部51は、行Tのオブジェクト名をAからnullに変更し(ステップA6)、行Tの次行のオブジェクト名がnullか否か判定し(ステップA7)、その結果、行Tの次行のオブジェクト名がnullの場合(ステップA7:YES)、行Tと行Tの次行とを結合するため、行Tのセグメント数に行Tの次行のセグメント数を加算し、行Tの次行を削除する(ステップA8)。   That is, the management table update unit 51 changes the object name of the row T from A to null (step A6), determines whether the object name of the next row of the row T is null (step A7), and as a result, When the object name of the next row of T is null (step A7: YES), the number of segments of the next row of row T is added to the number of segments of row T in order to combine row T and the next row of row T. The next row after row T is deleted (step A8).

次に、管理テーブル更新部51は、メモリ配置管理テーブル53の先頭からセグメント数がS2以上、オブジェクト名がnullの行(この行を新たなTとする)を検索し(ステップA9)、検索された行Tのオブジェクト名をnullからAに変更し(ステップA10)、行Tのセグメント数を取得して変数S1に代入する(ステップA11)。   Next, the management table update unit 51 searches for a row (the number T is a new T) having a segment number of S2 or more and an object name from the top of the memory allocation management table 53 (step A9). The object name in the row T is changed from null to A (step A10), the number of segments in the row T is acquired and substituted into the variable S1 (step A11).

次に、管理テーブル更新部51は、S1=S2か否か判定し(ステップA12)、その結果、S1=S2でない場合(変更後のオブジェクトコードのセグメント数が行Tのセグメント数より小さい場合)(ステップA12:No)、以下の処理を行う。   Next, the management table updating unit 51 determines whether or not S1 = S2 (step A12). As a result, if S1 = S2 is not satisfied (if the number of segments of the object code after the change is smaller than the number of segments in row T) (Step A12: No), the following processing is performed.

すなわち、管理テーブル更新部51は、行Tのセグメント数をS2に変更し(ステップA13)、行Tの次行のオブジェクト名がnullか否か判定し(ステップA14)、その結果、Tの次行のオブジェクト名がnullでない場合(ステップA14:No)、行Tの次行に、オブジェクト名がnull、先頭セグメント番号が0、セグメント数が0の行を追加する(ステップA15)。   That is, the management table update unit 51 changes the number of segments in the row T to S2 (step A13), determines whether or not the object name in the next row of the row T is null (step A14), and as a result, If the object name of the line is not null (step A14: No), a line with the object name null, the first segment number 0, and the number of segments 0 is added to the next line of the line T (step A15).

最後に、管理テーブル更新部51は、行Tの次行の先頭セグメント番号に「行Tのセグメント番号+S2」を代入し、セグメント数に「S2−S1」を加算する(ステップA16)。   Finally, the management table updating unit 51 assigns “Segment number of row T + S2” to the first segment number of the next row of row T, and adds “S2-S1” to the number of segments (step A16).

次に、図2のようにオブジェクト名がオブジェクト2のオブジェクトコードのセグメント数が1から2に変更された場合の管理テーブル更新部51の動作を、図3を参照して説明する。   Next, the operation of the management table updating unit 51 when the number of segments of the object code whose object name is the object 2 is changed from 1 to 2 as shown in FIG. 2 will be described with reference to FIG.

まず、管理テーブル更新部51は、メモリ配置管理テーブル53からオブジェクト名がオブジェクト2の行(この行をTとする)を検索し(ステップA1)、検索された行Tのセグメント数1を取得してS1=1とする(ステップA2)。   First, the management table update unit 51 searches the memory allocation management table 53 for a row whose object name is object 2 (this row is T) (step A1), and acquires the number of segments 1 of the searched row T. S1 = 1 (step A2).

次に、管理テーブル更新部51は、逆アセンブルリスト4からオブジェクト2のオブジェクトサイズ42を取得し(ステップA3)、オブジェクトコードの変更後のセグメント数2を計算し、S2=2とする(ステップA4)。   Next, the management table update unit 51 obtains the object size 42 of the object 2 from the disassemble list 4 (step A3), calculates the number of segments 2 after the change of the object code, and sets S2 = 2 (step A4). ).

次に、管理テーブル更新部51は、S1<S2か否か判定し(ステップA5)、その結果、S1<S2となるため(ステップA5:Yes)、以下の処理を行う。   Next, the management table updating unit 51 determines whether or not S1 <S2 (step A5). As a result, S1 <S2 is satisfied (step A5: Yes), and the following processing is performed.

すなわち、管理テーブル更新部51は、行Tのオブジェクト名をオブジェクト2からnullに変更し(ステップA6)、行Tの次行のオブジェクト名がnullか否か判定する(ステップA7)。その結果、行Tの次行のオブジェクト名はオブジェクト3であり、nullではないため(ステップA7:No)、管理テーブル更新部51は、メモリ配置管理テーブル53の先頭から、セグメント数S2(=2)以上、かつ、オブジェクト名がnullの行(この行を新たなTとする)を検索する(ステップA9)。   That is, the management table update unit 51 changes the object name of the row T from the object 2 to null (step A6), and determines whether the object name of the next row of the row T is null (step A7). As a result, since the object name of the next line of the line T is the object 3 and not null (step A7: No), the management table update unit 51 starts with the number of segments S2 (= 2 from the top of the memory allocation management table 53). ) The above is searched for the row with the object name null (this row is set as a new T) (step A9).

次に、管理テーブル更新部51は、行Tのオブジェクト名をnullからオブジェクト2に変更し(ステップA10)、行Tのセグメント数2を取得してS1=2とする(ステップA11)。   Next, the management table updating unit 51 changes the object name of the row T from null to the object 2 (step A10), acquires the number of segments 2 of the row T, and sets S1 = 2 (step A11).

次に、管理テーブル更新部51は、S1=S2か否か判定し(ステップA12)、その結果、S1=S2となるため(ステップA12:Yes)、メモリ配置管理テーブル53の更新処理を終了する。   Next, the management table update unit 51 determines whether or not S1 = S2 (step A12). As a result, since S1 = S2 (step A12: Yes), the update processing of the memory arrangement management table 53 is terminated. .

以上のように、本実施の形態によれば、メモリ領域を固定長サイズのセグメントに分割し、オブジェクトコードをセグメント境界に配置する。そして、オブジェクトコードの変更により、割り当てられたセグメント内にオブジェクトコードが収まらなくなった場合は、オブジェクトコードを空き領域に移動し、割り当てられたセグメント内に収まる場合は、オブジェクトコードは移動しない。オブジェクトコードが移動するのは、オブジェクトコードが変更され、かつ、割り当てられたセグメント内に収まらない場合のみであり、その移動を最小限にすることができる。   As described above, according to the present embodiment, the memory area is divided into fixed-sized segments, and the object code is arranged at the segment boundary. If the object code does not fit in the allocated segment due to the change of the object code, the object code is moved to the free area, and if it falls within the allocated segment, the object code does not move. The object code is moved only when the object code is changed and does not fit within the allocated segment, and the movement can be minimized.

これにより、OSのソースコード1の修正によってオブジェクトコードが変更された場合に、変更の前後で、変更のない他のオブジェクトコード、例えばプローブ(障害解析のためOSに埋め込んだ情報採取処理)のアドレスが変わらないようにするメモリ配置を実現することができる。   As a result, when the object code is changed by modifying the OS source code 1, the address of another object code that does not change, for example, a probe (information collecting process embedded in the OS for failure analysis) before and after the change is made. It is possible to realize a memory arrangement that keeps the same from changing.

図4(a)、(b)は、前述した図6(a)、(b)と同じオブジェクトコードに対して、本実施の形態を適用した場合の例を示す。図6(a)、(b)の例では、オブジェクト名がオブジェクト2のオブジェクトコードは割り当てられたセグメント内に収まらなくなったため、空き領域に移動しており、オブジェクト名がオブジェクト1のオブジェクトコードは割り当てられたセグメント内に収まるため、移動しない。変更のないオブジェクト名がオブジェクト3のオブジェクトコード内のプローブのアドレスは変わっていない。   FIGS. 4A and 4B show an example in which the present embodiment is applied to the same object code as in FIGS. 6A and 6B described above. In the example shown in FIGS. 6A and 6B, the object code whose object name is object 2 is not fit in the allocated segment, so it has been moved to a free space, and the object code whose object name is object 1 is allocated. Does not move because it fits within the specified segment. The address of the probe in the object code of the object 3 whose object name is not changed is not changed.

従って、本実施の形態によれば、OSの処理を変更した際、解析スクリプトに記載されているプローブアドレスの修正を最小限にできる。その理由は、オブジェクトの変更により、変更後のオブジェクトコードが割り当てられたセグメントに収まらなくなった場合は、変更後のオブジェクトコードを空き領域に移動し、他のオブジェクトコードのアドレスが変わらないようにするためである。   Therefore, according to this embodiment, when the OS processing is changed, the correction of the probe address described in the analysis script can be minimized. The reason is that when the object code after the change does not fit in the allocated segment due to the object change, the object code after the change is moved to a free area so that the address of the other object code does not change. Because.

なお、オブジェクトコードをセグメント境界に配置することにより、オブジェクトコード間に空き領域ができるため、キャッシュメモリの利用効率が低くなる可能性がある。しかし、キャッシュラインサイズのセグメントに分割し、オブジェクトコードをキャッシュライン境界に配置することで、オブジェクトコードの先頭部分がセグメント境界を跨ぐことがなくなるため、キャッシュメモリの利用効率が高くなると考えられる。   In addition, since an empty area is created between object codes by arranging the object code at the segment boundary, the use efficiency of the cache memory may be lowered. However, by dividing the cache line size into segments and placing the object code on the boundary of the cache line, the head portion of the object code does not straddle the segment boundary. Therefore, it is considered that the use efficiency of the cache memory is increased.

すなわち、本実施の形態では、セグメントのサイズをキャッシュラインのサイズとすることで、コードがキャッシュライン境界を跨ることがなくなり、キャッシュメモリの利用効率が高くなる。   In other words, in this embodiment, by setting the segment size to the cache line size, the code does not cross the cache line boundary, and the use efficiency of the cache memory is increased.

また、本実施の形態では、メモリ領域を固定長のセグメントに分割し、セグメント境界にコードを割り当てるだけで、自動的に空き領域のサイズが決まるため、空き領域の指定は不要である。   Further, in this embodiment, the size of the free area is automatically determined simply by dividing the memory area into fixed-length segments and assigning codes to the segment boundaries, so it is not necessary to specify the free area.

上記のメモリ配置管理装置は、ハードウェア、ソフトウェア又はこれらの組合せにより実現することができる。この場合のハードウェア、ソフトウェア又はこれらの組合せによる構成は特に限定されるものではなく、上述した機能を実現可能なものであれば、いずれの形態でも適用可能である。   The memory arrangement management device described above can be realized by hardware, software, or a combination thereof. In this case, the configuration of hardware, software, or a combination thereof is not particularly limited, and any configuration is applicable as long as the above-described functions can be realized.

上記の実施の形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限定されない。   A part or all of the above embodiment can be described as in the following supplementary notes, but is not limited to the following.

(付記1)メモリ領域を予め設定された固定長サイズのセグメントに分割し、分割したセグメントにオブジェクトコードを割り当てて配置したときの当該オブジェクトコードが割り当てられたセグメントの先頭セグメント番号およびセグメント数を、当該オブジェクトコードが割り当てられていない空き領域となるセグメントの先頭セグメント番号およびセグメント数と共に管理するメモリ配置管理テーブルと、前記オブジェクトコードが更新される際、更新後のオブジェクトコードのオブジェクトサイズから変更後のオブジェクトコードに割り当てられるセグメントのセグメント数を計算し、変更後のセグメント数が変更前のセグメント数よりも大きいとき、変更後のオブジェクトコードを変更後のセグメント数以上の空き領域となるセグメントに移動し、変更後のセグメント数が変更前のセグメント数以下のとき、変更後のオブジェクトコードをその変更前のセグメント内に収めるように前記メモリ配置管理テーブルを更新する管理テーブル更新部と、更新された前記メモリ配置管理テーブルから、前記オブジェクトコードのメモリ配置を設定するためのオブジェクトアドレスを含むメモリ配置設定ファイルを生成する設定ファイル生成部とを有することを特徴とするメモリ配置管理装置。   (Supplementary note 1) The memory area is divided into predetermined fixed-size segments, and when the object code is assigned to the divided segment and arranged, the first segment number and the number of segments to which the object code is assigned are A memory allocation management table that is managed together with the first segment number and the number of segments that become an empty area to which the object code is not allocated, and when the object code is updated, the object code after the update is changed from the object size Calculate the number of segments allocated to the object code, and when the number of segments after the change is larger than the number of segments before the change, the segment where the object code after the change becomes a free space greater than the number of segments after the change A management table update unit that updates the memory allocation management table so that the object code after the change is included in the segment before the change when the number of segments after the change is equal to or less than the number of segments before the change, A memory location management apparatus, comprising: a setting file generation unit that generates a memory location setting file including an object address for setting a memory location of the object code from the updated memory location management table.

(付記2)前記管理テーブル更新部は、変更後のセグメント数が変更前のセグメント数より小さいとき、変更後のオブジェクトコードを、変更前のセグメントの内、先頭セグメントから変更後のセグメント数分のセグメントに収め、その残りのセグメントを空き領域とするように前記メモリ配置管理テーブルを更新することを特徴とする付記1に記載のメモリ配置管理装置。   (Supplementary note 2) When the number of segments after the change is smaller than the number of segments before the change, the management table update unit changes the object code after the change from the first segment to the number of segments after the change. The memory allocation management device according to appendix 1, wherein the memory allocation management table is updated so as to be stored in a segment and the remaining segment is set as a free area.

(付記3)前記メモリ配置管理テーブルは、前記オブジェクトコードが割り当てられたセグメントの場合、当該オブジェクトコードのオブジェクト名に対応付けて、前記先頭セグメント番号およびセグメント数を管理すると共に、前記空き領域となるセグメントの場合、前記オブジェクトコードのオブジェクト名をnullとし、当該nullに対応付けて、前記先頭セグメント番号およびセグメント数を管理することを特徴とする付記1又は2に記載のメモリ配置管理装置。   (Supplementary Note 3) In the case of a segment to which the object code is assigned, the memory allocation management table manages the head segment number and the number of segments in association with the object name of the object code and becomes the free area. 3. The memory allocation management device according to appendix 1 or 2, wherein in the case of a segment, the object name of the object code is set to null, and the head segment number and the number of segments are managed in association with the null.

(付記4)前記セグメントの固定長サイズは、キャッシュメモリのキャッシュラインサイズに予め設定されることを特徴とする付記1から3のいずれかに記載のメモリ配置管理装置。   (Supplementary note 4) The memory arrangement management device according to any one of supplementary notes 1 to 3, wherein the fixed length size of the segment is preset to a cache line size of a cache memory.

(付記5)前記オブジェクトコードは、オペレーティングシステムを構成するオブジェクトコードであることを特徴とする付記1から4のいずれかに記載のメモリ配置管理装置。   (Supplementary note 5) The memory allocation management device according to any one of supplementary notes 1 to 4, wherein the object code is an object code constituting an operating system.

(付記6)前記オブジェクトコードは、前記オペレーティングシステムの障害解析のための情報採取処理を行うプローブが埋め込まれていることを特徴とする付記5に記載のメモリ配置管理装置。   (Supplementary note 6) The memory allocation management device according to supplementary note 5, wherein the object code is embedded with a probe for performing information collection processing for failure analysis of the operating system.

(付記7)メモリ配置管理テーブルが、メモリ領域を固定長サイズのセグメントに分割し、分割したセグメントにオブジェクトコードを割り当てて配置したときの当該オブジェクトコードが割り当てられたセグメントの先頭セグメント番号およびセグメント数を、当該オブジェクトコードが割り当てられていない空き領域となるセグメントの先頭セグメント番号およびセグメント数と共に管理し、管理テーブル更新部が、前記オブジェクトコードが更新される際、更新後のオブジェクトコードのオブジェクトサイズから変更後のオブジェクトコードに割り当てられるセグメントのセグメント数を計算し、変更後のセグメント数が変更前のセグメント数よりも大きいとき、変更後のオブジェクトコードを変更後のセグメント数以上の空き領域となるセグメントに移動し、変更後のセグメント数が変更前のセグメント数以下のとき、変更後のオブジェクトコードをその変更前のセグメント内に収めるように前記メモリ配置管理テーブルを更新し、設定ファイル生成部が、更新された前記メモリ配置管理テーブルから、前記オブジェクトコードのメモリ配置を設定するためのオブジェクトアドレスを含むメモリ配置設定ファイルを生成することを特徴とするメモリ配置管理方法。   (Supplementary note 7) When the memory allocation management table divides the memory area into fixed-length segments and assigns and allocates object codes to the divided segments, the first segment number and the number of segments to which the object code is assigned Are managed together with the first segment number and the number of segments of a segment that is an empty area to which the object code is not assigned, and the management table update unit determines from the object size of the updated object code when the object code is updated. Calculate the number of segments allocated to the object code after the change, and if the number of segments after the change is greater than the number of segments before the change, change the object code after the change to free space equal to or greater than the number of segments after the change. When the number of segments after the change is less than or equal to the number of segments before the change, the memory allocation management table is updated so that the object code after the change is included in the segment before the change, and the configuration file generation unit Generating a memory location setting file including an object address for setting the memory location of the object code from the updated memory location management table.

(付記8)前記管理テーブル更新部が、変更後のセグメント数が変更前のセグメント数より小さいとき、変更後のオブジェクトコードを、変更前のセグメントの内、先頭セグメントから変更後のセグメント数分のセグメントに収め、その残りのセグメントを空き領域とするように前記メモリ配置管理テーブルを更新することを特徴とする付記7に記載のメモリ配置管理方法。   (Supplementary Note 8) When the number of segments after the change is smaller than the number of segments before the change, the management table update unit changes the object code after the change from the first segment to the number of segments after the change. 8. The memory allocation management method according to appendix 7, wherein the memory allocation management table is updated so as to be contained in a segment and the remaining segment is a free area.

(付記9)前記メモリ配置管理テーブルが、前記オブジェクトコードが割り当てられたセグメントの場合、当該オブジェクトコードのオブジェクト名に対応付けて、前記先頭セグメント番号およびセグメント数を管理すると共に、前記空き領域となるセグメントの場合、前記オブジェクトコードのオブジェクト名をnullとし、当該nullに対応付けて、前記先頭セグメント番号およびセグメント数を管理することを特徴とする付記7又は8に記載のメモリ配置管理方法。   (Supplementary Note 9) When the memory allocation management table is a segment to which the object code is assigned, it manages the head segment number and the number of segments in association with the object name of the object code and becomes the free area. 9. The memory allocation management method according to appendix 7 or 8, wherein in the case of a segment, the object name of the object code is set to null, and the head segment number and the number of segments are managed in association with the null.

(付記10)前記セグメントの固定長サイズは、キャッシュメモリのキャッシュラインサイズに予め設定されることを特徴とする付記7から9のいずれかに記載のメモリ配置管理方法。   (Supplementary note 10) The memory allocation management method according to any one of supplementary notes 7 to 9, wherein the fixed length size of the segment is preset to a cache line size of a cache memory.

(付記11)前記オブジェクトコードは、オペレーティングシステムを構成するオブジェクトコードであることを特徴とする付記7から10のいずれかに記載のメモリ配置管理方法。   (Supplementary note 11) The memory allocation management method according to any one of supplementary notes 7 to 10, wherein the object code is an object code constituting an operating system.

(付記12)前記オブジェクトコードは、前記オペレーティングシステムの障害解析のための情報採取処理を行うプローブが埋め込まれていることを特徴とする付記11に記載のメモリ配置管理方法。   (Supplementary note 12) The memory allocation management method according to supplementary note 11, wherein the object code is embedded with a probe for performing information collection processing for failure analysis of the operating system.

(付記13)コンピュータを、メモリ領域を固定長サイズのセグメントに分割し、分割したセグメントにオブジェクトコードを割り当てて配置したときの当該オブジェクトコードが割り当てられたセグメントの先頭セグメント番号およびセグメント数を、当該オブジェクトコードが割り当てられていない空き領域となるセグメントの先頭セグメント番号およびセグメント数と共に管理するメモリ配置管理テーブルと、前記オブジェクトコードが更新される際、更新後のオブジェクトコードのオブジェクトサイズから変更後のオブジェクトコードに割り当てられるセグメントのセグメント数を計算し、変更後のセグメント数が変更前のセグメント数よりも大きいとき、変更後のオブジェクトコードを変更後のセグメント数以上の空き領域となるセグメントに移動し、変更後のセグメント数が変更前のセグメント数以下のとき、変更後のオブジェクトコードをその変更前のセグメント内に収めるように前記メモリ配置管理テーブルを更新する管理テーブル更新部と、更新された前記メモリ配置管理テーブルから、前記オブジェクトコードのメモリ配置を設定するためのオブジェクトアドレスを含むメモリ配置設定ファイルを生成する設定ファイル生成部として機能させることを特徴とするメモリ配置管理プログラム。   (Supplementary note 13) When the computer divides the memory area into segments of a fixed length size and assigns the object code to the divided segment and arranges it, the first segment number and the number of segments to which the object code is assigned are A memory allocation management table that is managed together with the first segment number and the number of segments of an empty area to which no object code is assigned, and when the object code is updated, the object after the change from the object size of the updated object code When the number of segments allocated to the code is calculated and the number of segments after the change is larger than the number of segments before the change, the object code after the change becomes free space more than the number of segments after the change. A management table update unit that updates the memory allocation management table so that the object code after the change is included in the segment before the change when the number of segments after the change is equal to or less than the number of segments before the change, A memory allocation management program that functions as a setting file generation unit that generates a memory allocation setting file including an object address for setting the memory allocation of the object code from the updated memory allocation management table.

(付記14)前記管理テーブル更新部は、変更後のセグメント数が変更前のセグメント数より小さいとき、変更後のオブジェクトコードを、変更前のセグメントの内、先頭セグメントから変更後のセグメント数分のセグメントに収め、その残りのセグメントを空き領域とするように前記メモリ配置管理テーブルを更新することを特徴とする付記13に記載のメモリ配置管理プログラム。   (Supplementary Note 14) When the number of segments after the change is smaller than the number of segments before the change, the management table update unit changes the object code after the change from the first segment to the number of segments after the change. 14. The memory allocation management program according to appendix 13, wherein the memory allocation management table is updated so as to be contained in a segment and the remaining segment is set as an empty area.

(付記15)前記メモリ配置管理テーブルは、前記オブジェクトコードが割り当てられたセグメントの場合、当該オブジェクトコードのオブジェクト名に対応付けて、前記先頭セグメント番号およびセグメント数を管理すると共に、前記空き領域となるセグメントの場合、前記オブジェクトコードのオブジェクト名をnullとし、当該nullに対応付けて、前記先頭セグメント番号およびセグメント数を管理することを特徴とする付記13又は14に記載のメモリ配置管理プログラム。   (Supplementary Note 15) In the case of a segment to which the object code is assigned, the memory allocation management table manages the head segment number and the number of segments in association with the object name of the object code and becomes the free area. 15. The memory arrangement management program according to appendix 13 or 14, wherein in the case of a segment, the object name of the object code is set to null, and the head segment number and the number of segments are managed in association with the null.

(付記16)前記セグメントの固定長サイズは、キャッシュメモリのキャッシュラインサイズに予め設定されることを特徴とする付記13から15のいずれかに記載のメモリ配置管理プログラム。   (Supplementary note 16) The memory arrangement management program according to any one of supplementary notes 13 to 15, wherein the fixed length size of the segment is preset to a cache line size of a cache memory.

(付記17)前記オブジェクトコードは、オペレーティングシステムを構成するオブジェクトコードであることを特徴とする付記13から16のいずれかに記載のメモリ配置管理プログラム。   (Supplementary note 17) The memory allocation management program according to any one of Supplementary notes 13 to 16, wherein the object code is an object code constituting an operating system.

(付記18)前記オブジェクトコードは、前記オペレーティングシステムの障害解析のための情報採取処理を行うプローブが埋め込まれていることを特徴とする付記17に記載のメモリ配置管理プログラム。   (Supplementary note 18) The memory allocation management program according to supplementary note 17, wherein the object code is embedded with a probe for performing information collection processing for failure analysis of the operating system.

(付記19)付記1から6のいずれかに記載のメモリ配置管理装置と、オブジェクトコードをリンクして実行ファイルを生成し、当該オブジェクトコードのリンク時に前記メモリ配置管理装置により生成されたメモリ配置設定ファイルを用いて前記オブジェクトコードのメモリ配置を設定するリンカとを有することを特徴とするプログラム作成システム。   (Supplementary note 19) An execution file is generated by linking an object code with the memory allocation management device according to any one of supplementary notes 1 to 6, and the memory allocation setting generated by the memory allocation management device when the object code is linked And a linker that sets a memory allocation of the object code using a file.

(付記20)ソースコードをコンパイルして前記オブジェクトコードを生成するコンパイラと、前記オブジェクトコードを逆アセンブルして当該オブジェクトコードのオブジェクト名およびオブジェクトサイズを含む逆アセンブルリストを生成する逆アセンブラとをさらに有することを特徴とする付記19に記載のプログラム作成システム。   (Additional remark 20) It further has the compiler which compiles a source code and produces | generates the said object code, and the disassembler which disassembles the said object code and produces | generates the disassemble list | wrist including the object name and object size of the said object code | cord | chord The program creation system according to supplementary note 19, characterized by that.

以上、実施の形態を参照して本願発明を説明したが、本願発明は上記実施の形態に限定されるものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。   Although the present invention has been described with reference to the embodiments, the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.

以上説明したように、本発明は、OSのオブジェクトコードのメモリ配置を管理するメモリ配置管理装置、メモリ配置管理方法、メモリ配置管理プログラム、およびプログラム作成システムの用途に利用可能である。   As described above, the present invention can be used for a memory arrangement management device, a memory arrangement management method, a memory arrangement management program, and a program creation system that manage the memory arrangement of an OS object code.

1 ソースコード
2 オブジェクトコード
3 実行ファイル
4 逆アセンブルリスト
5 メモリ配置管理ツール
6 メモリ配置設定ファイル
10 コンパイラ
20 リンカ
40 逆アセンブラ
41 オブジェクト名
42 オブジェクトサイズ
50 メモリ配置管理装置
51 管理テーブル更新部
52 設定ファイル生成部
53 メモリ配置管理テーブル
100 コンピュータ
101 OS
102 解析プログラム
103 インタプリタ
110 外部記憶媒体
111 解析スクリプト
112 ログファイル
DESCRIPTION OF SYMBOLS 1 Source code 2 Object code 3 Execution file 4 Disassembly list 5 Memory allocation management tool 6 Memory allocation setting file 10 Compiler 20 Linker 40 Disassembler 41 Object name 42 Object size 50 Memory allocation management device 51 Management table update part 52 Setting file generation 53 Memory allocation management table 100 Computer 101 OS
102 Analysis program 103 Interpreter 110 External storage medium 111 Analysis script 112 Log file

Claims (10)

メモリ領域を予め設定された固定長サイズのセグメントに分割し、分割したセグメントにオブジェクトコードを割り当てて配置したときの当該オブジェクトコードが割り当てられたセグメントの先頭セグメント番号およびセグメント数を、当該オブジェクトコードが割り当てられていない空き領域となるセグメントの先頭セグメント番号およびセグメント数と共に管理するメモリ配置管理テーブルと、
前記オブジェクトコードが更新される際、更新後のオブジェクトコードのオブジェクトサイズから変更後のオブジェクトコードに割り当てられるセグメントのセグメント数を計算し、変更後のセグメント数が変更前のセグメント数よりも大きいとき、変更後のオブジェクトコードを変更後のセグメント数以上の空き領域となるセグメントに移動し、変更後のセグメント数が変更前のセグメント数以下のとき、変更後のオブジェクトコードをその変更前のセグメント内に収めるように前記メモリ配置管理テーブルを更新する管理テーブル更新部と、
更新された前記メモリ配置管理テーブルから、前記オブジェクトコードのメモリ配置を設定するためのオブジェクトアドレスを含むメモリ配置設定ファイルを生成する設定ファイル生成部とを有することを特徴とするメモリ配置管理装置。
When the memory area is divided into predetermined fixed-size segments, and the object code is assigned to the divided segments, the start segment number and the number of segments to which the object code is assigned are indicated by the object code. A memory allocation management table that is managed together with the first segment number and the number of segments of an unallocated free area;
When the object code is updated, the number of segments allocated to the object code after change is calculated from the object size of the object code after update, and when the number of segments after change is larger than the number of segments before change, Move the object code after the change to a segment that has more free space than the number of segments after the change, and when the number of segments after the change is less than or equal to the number of segments before the change, change the object code into the segment before the change A management table update unit for updating the memory arrangement management table so as to accommodate;
A memory location management apparatus, comprising: a setting file generation unit that generates a memory location setting file including an object address for setting a memory location of the object code from the updated memory location management table.
前記管理テーブル更新部は、変更後のセグメント数が変更前のセグメント数より小さいとき、変更後のオブジェクトコードを、変更前のセグメントの内、先頭セグメントから変更後のセグメント数分のセグメントに収め、その残りのセグメントを空き領域とするように前記メモリ配置管理テーブルを更新することを特徴とする請求項1に記載のメモリ配置管理装置。   When the number of segments after the change is smaller than the number of segments before the change, the management table update unit stores the object code after the change in the number of segments after the change from the first segment in the segment before the change, 2. The memory arrangement management apparatus according to claim 1, wherein the memory arrangement management table is updated so that the remaining segment is an empty area. 前記メモリ配置管理テーブルは、前記オブジェクトコードが割り当てられたセグメントの場合、当該オブジェクトコードのオブジェクト名に対応付けて、前記先頭セグメント番号およびセグメント数を管理すると共に、前記空き領域となるセグメントの場合、前記オブジェクトコードのオブジェクト名をnullとし、当該nullに対応付けて、前記先頭セグメント番号およびセグメント数を管理することを特徴とする請求項1又は2に記載のメモリ配置管理装置。   In the memory allocation management table, in the case of a segment to which the object code is assigned, the head segment number and the number of segments are managed in association with the object name of the object code, and in the case of the segment to be the free area, 3. The memory arrangement management device according to claim 1, wherein an object name of the object code is set to null, and the head segment number and the number of segments are managed in association with the null. 前記セグメントの固定長サイズは、キャッシュメモリのキャッシュラインサイズに予め設定されることを特徴とする請求項1から3のいずれかに記載のメモリ配置管理装置。   4. The memory arrangement management device according to claim 1, wherein the fixed length size of the segment is preset to a cache line size of a cache memory. 前記オブジェクトコードは、オペレーティングシステムを構成するオブジェクトコードであることを特徴とする請求項1から4のいずれかに記載のメモリ配置管理装置。   5. The memory allocation management device according to claim 1, wherein the object code is an object code constituting an operating system. 前記オブジェクトコードは、前記オペレーティングシステムの障害解析のための情報採取処理を行うプローブが埋め込まれていることを特徴とする請求項5に記載のメモリ配置管理装置。   6. The memory arrangement management device according to claim 5, wherein the object code includes an embedded probe for performing information collection processing for failure analysis of the operating system. メモリ配置管理テーブルが、メモリ領域を固定長サイズのセグメントに分割し、分割したセグメントにオブジェクトコードを割り当てて配置したときの当該オブジェクトコードが割り当てられたセグメントの先頭セグメント番号およびセグメント数を、当該オブジェクトコードが割り当てられていない空き領域となるセグメントの先頭セグメント番号およびセグメント数と共に管理し、
管理テーブル更新部が、前記オブジェクトコードが更新される際、更新後のオブジェクトコードのオブジェクトサイズから変更後のオブジェクトコードに割り当てられるセグメントのセグメント数を計算し、変更後のセグメント数が変更前のセグメント数よりも大きいとき、変更後のオブジェクトコードを変更後のセグメント数以上の空き領域となるセグメントに移動し、変更後のセグメント数が変更前のセグメント数以下のとき、変更後のオブジェクトコードをその変更前のセグメント内に収めるように前記メモリ配置管理テーブルを更新し、
設定ファイル生成部が、更新された前記メモリ配置管理テーブルから、前記オブジェクトコードのメモリ配置を設定するためのオブジェクトアドレスを含むメモリ配置設定ファイルを生成することを特徴とするメモリ配置管理方法。
When the memory allocation management table divides the memory area into fixed-size segments and assigns object codes to the divided segments, the start segment number and the number of segments to which the object code is assigned are It is managed together with the first segment number and the number of segments of the segment that is an empty area to which no code is assigned,
When the object code is updated, the management table update unit calculates the number of segments allocated to the changed object code from the object size of the updated object code, and the changed segment number is the segment before the change. If the number is larger than the number, move the object code after the change to a segment that has more space than the number of segments after the change.If the number of segments after the change is less than or equal to the number of segments before the change, change the object code to Update the memory allocation management table to fit in the segment before the change,
A memory allocation management method, wherein a setting file generation unit generates a memory allocation setting file including an object address for setting the memory allocation of the object code from the updated memory allocation management table.
コンピュータを、
メモリ領域を固定長サイズのセグメントに分割し、分割したセグメントにオブジェクトコードを割り当てて配置したときの当該オブジェクトコードが割り当てられたセグメントの先頭セグメント番号およびセグメント数を、当該オブジェクトコードが割り当てられていない空き領域となるセグメントの先頭セグメント番号およびセグメント数と共に管理するメモリ配置管理テーブルと、
前記オブジェクトコードが更新される際、更新後のオブジェクトコードのオブジェクトサイズから変更後のオブジェクトコードに割り当てられるセグメントのセグメント数を計算し、変更後のセグメント数が変更前のセグメント数よりも大きいとき、変更後のオブジェクトコードを変更後のセグメント数以上の空き領域となるセグメントに移動し、変更後のセグメント数が変更前のセグメント数以下のとき、変更後のオブジェクトコードをその変更前のセグメント内に収めるように前記メモリ配置管理テーブルを更新する管理テーブル更新部と、
更新された前記メモリ配置管理テーブルから、前記オブジェクトコードのメモリ配置を設定するためのオブジェクトアドレスを含むメモリ配置設定ファイルを生成する設定ファイル生成部として機能させることを特徴とするメモリ配置管理プログラム。
Computer
When the memory area is divided into fixed-size segments, and the object code is assigned to the divided segment, the segment number to which the object code is assigned and the number of segments are not assigned. A memory allocation management table that is managed together with the first segment number and the number of segments of a segment that becomes a free area;
When the object code is updated, the number of segments allocated to the object code after change is calculated from the object size of the object code after update, and when the number of segments after change is larger than the number of segments before change, Move the object code after the change to a segment that has more free space than the number of segments after the change, and when the number of segments after the change is less than or equal to the number of segments before the change, change the object code into the segment before the change A management table update unit for updating the memory arrangement management table so as to accommodate;
A memory allocation management program that functions as a setting file generation unit that generates a memory allocation setting file including an object address for setting the memory allocation of the object code from the updated memory allocation management table.
請求項1から6のいずれかに記載のメモリ配置管理装置と、
オブジェクトコードをリンクして実行ファイルを生成し、当該オブジェクトコードのリンク時に前記メモリ配置管理装置により生成されたメモリ配置設定ファイルを用いて前記オブジェクトコードのメモリ配置を設定するリンカとを有することを特徴とするプログラム作成システム。
The memory arrangement management device according to any one of claims 1 to 6,
A linker that generates an execution file by linking object code, and that sets a memory allocation of the object code using a memory allocation setting file generated by the memory allocation management device when the object code is linked. Program creation system.
ソースコードをコンパイルして前記オブジェクトコードを生成するコンパイラと、
前記オブジェクトコードを逆アセンブルして当該オブジェクトコードのオブジェクト名およびオブジェクトサイズを含む逆アセンブルリストを生成する逆アセンブラとをさらに有することを特徴とする請求項9に記載のプログラム作成システム。
A compiler that compiles source code to generate the object code;
10. The program creation system according to claim 9, further comprising a disassembler that disassembles the object code to generate a disassemble list including an object name and an object size of the object code.
JP2011117975A 2011-05-26 2011-05-26 Memory allocation management device, memory allocation management method, memory allocation management program, and program creation system Expired - Fee Related JP5660386B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011117975A JP5660386B2 (en) 2011-05-26 2011-05-26 Memory allocation management device, memory allocation management method, memory allocation management program, and program creation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011117975A JP5660386B2 (en) 2011-05-26 2011-05-26 Memory allocation management device, memory allocation management method, memory allocation management program, and program creation system

Publications (2)

Publication Number Publication Date
JP2012247908A true JP2012247908A (en) 2012-12-13
JP5660386B2 JP5660386B2 (en) 2015-01-28

Family

ID=47468315

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011117975A Expired - Fee Related JP5660386B2 (en) 2011-05-26 2011-05-26 Memory allocation management device, memory allocation management method, memory allocation management program, and program creation system

Country Status (1)

Country Link
JP (1) JP5660386B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015210574A (en) * 2014-04-24 2015-11-24 富士通株式会社 Information processor, processing method and processing program
JP2016192154A (en) * 2015-03-31 2016-11-10 株式会社デンソー Juxtaposed compilation method, juxtaposed compiler, and on-vehicle device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01283653A (en) * 1988-05-11 1989-11-15 Nec Corp Memory pool managing system
JPH03113652A (en) * 1989-09-28 1991-05-15 Nec Corp Dynamic control system for memory area
JP2000155673A (en) * 1998-11-18 2000-06-06 Nec Ic Microcomput Syst Ltd Link device and link method
JP2001344109A (en) * 2000-05-31 2001-12-14 Sony Corp Program generating method, program generating device, and memory medium
JP2003108397A (en) * 2001-09-27 2003-04-11 Nec Eng Ltd Firmware rewriting method
JP2007524171A (en) * 2004-02-27 2007-08-23 テレフオンアクチーボラゲット エル エム エリクソン(パブル) Flash memory programming
JP2010266939A (en) * 2009-05-12 2010-11-25 Renesas Electronics Corp Reverse assembling system, reverse assembling program, and reverse assembling method
JP2011086141A (en) * 2009-10-16 2011-04-28 Ricoh Co Ltd Image forming apparatus and program operating method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01283653A (en) * 1988-05-11 1989-11-15 Nec Corp Memory pool managing system
JPH03113652A (en) * 1989-09-28 1991-05-15 Nec Corp Dynamic control system for memory area
JP2000155673A (en) * 1998-11-18 2000-06-06 Nec Ic Microcomput Syst Ltd Link device and link method
JP2001344109A (en) * 2000-05-31 2001-12-14 Sony Corp Program generating method, program generating device, and memory medium
JP2003108397A (en) * 2001-09-27 2003-04-11 Nec Eng Ltd Firmware rewriting method
JP2007524171A (en) * 2004-02-27 2007-08-23 テレフオンアクチーボラゲット エル エム エリクソン(パブル) Flash memory programming
JP2010266939A (en) * 2009-05-12 2010-11-25 Renesas Electronics Corp Reverse assembling system, reverse assembling program, and reverse assembling method
JP2011086141A (en) * 2009-10-16 2011-04-28 Ricoh Co Ltd Image forming apparatus and program operating method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015210574A (en) * 2014-04-24 2015-11-24 富士通株式会社 Information processor, processing method and processing program
JP2016192154A (en) * 2015-03-31 2016-11-10 株式会社デンソー Juxtaposed compilation method, juxtaposed compiler, and on-vehicle device

Also Published As

Publication number Publication date
JP5660386B2 (en) 2015-01-28

Similar Documents

Publication Publication Date Title
JP7090657B2 (en) Methods, devices, devices and storage media for upgrading applications
CN103955363B (en) A kind of manufacture method of program upgrade installation package
CN103744709B (en) patch loading method and device
EP3084596B1 (en) Executable code for constrained computing environments
Johnson et al. ThinLTO: scalable and incremental LTO
KR101213275B1 (en) System and method for providing monolithic image for use in a wireless device
US8930899B2 (en) Artifact divider for large scale application builds
US20090259999A1 (en) Method and system for applying a patch during application execution
JP2018049506A (en) Determination device and determination method
US20070006201A1 (en) Method and system for generating and applying patches to a computer program concurrently with its execution
US8423589B2 (en) Copy collector with efficient abort-on-copy transition to mark collector
EP3455736B1 (en) Dynamically sized locals with precise garbage collection reporting
CN102147743A (en) Method for accelerating startup of embedded system application program
CN105446712A (en) Defect mending method and device for application program
Panchenko et al. Lightning bolt: powerful, fast, and scalable binary optimization
JP2018092383A (en) Compilation program, compilation method and information processor
JPH0926884A (en) Method and apparatus for making required flow information usable during task requiring binary information
CN103645888A (en) System and method for automatically building operation system
JP5660386B2 (en) Memory allocation management device, memory allocation management method, memory allocation management program, and program creation system
JP5146134B2 (en) Compile processing device, access pattern change processing method, and processing program
JP5489884B2 (en) Instruction execution device, instruction execution method, and instruction execution program
JP5906609B2 (en) Debug support program, debug support method, and debug support system
JP2015022511A (en) Programmable controller system, and support device and program thereof
CN110990018B (en) Compiling method and compiling system of embedded system
JP7081805B2 (en) Information processing equipment, load module generation methods and programs, and dynamic program update systems and methods

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140408

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141031

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: 20141106

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141119

R150 Certificate of patent or registration of utility model

Ref document number: 5660386

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees