JP2010108216A - Memory management system, electronic equipment and memory management program - Google Patents

Memory management system, electronic equipment and memory management program Download PDF

Info

Publication number
JP2010108216A
JP2010108216A JP2008279210A JP2008279210A JP2010108216A JP 2010108216 A JP2010108216 A JP 2010108216A JP 2008279210 A JP2008279210 A JP 2008279210A JP 2008279210 A JP2008279210 A JP 2008279210A JP 2010108216 A JP2010108216 A JP 2010108216A
Authority
JP
Japan
Prior art keywords
memory
address space
management system
logical
allocation
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
JP2008279210A
Other languages
Japanese (ja)
Inventor
Toshiaki Ueno
敏昭 上野
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.)
Kyocera Document Solutions Inc
Original Assignee
Kyocera Mita 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 Kyocera Mita Corp filed Critical Kyocera Mita Corp
Priority to JP2008279210A priority Critical patent/JP2010108216A/en
Priority to US12/607,673 priority patent/US8291192B2/en
Publication of JP2010108216A publication Critical patent/JP2010108216A/en
Priority to US13/606,784 priority patent/US8539198B2/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problem that it is impossible to efficiently avoid fragmentation of a memory, and that it is impossible to allocate or release continuous memory spaces at a high speed, and to increase/decrease the size of the allocated continuous memory spaces, in a memory management system, electronic equipment and a memory management program. <P>SOLUTION: In a memory management system, electronic equipment and a memory management program, a physical address space is treated in units of small-size micro-partitions, and continuous logical address spaces divided for each application are allocated to the necessary number of micro-partitions. <P>COPYRIGHT: (C)2010,JPO&amp;INPIT

Description

メモリ管理システム、電子機器及びメモリ管理プログラムにおいて、メモリの割当・解放動作に関して、フラグメンテーションの発生を抑制し効率的なメモリ管理を行う技術に関する。   The present invention relates to a technique for performing efficient memory management by suppressing the occurrence of fragmentation in memory allocation / release operations in memory management systems, electronic devices, and memory management programs.

半導体メモリや磁気回転ディスクなどの記憶装置を備える電子機器では、メモリの管理を効率的に行う技術的要求がある。メモリは使用時に必要領域を確保(割当)し、その使用が終わった後は解放して再使用に備える。このような、メモリの割当・解放動作を繰り返すと、フラグメンテーションと呼ばれる使用可能なメモリ空間がアドレス空間上に細かく分散して存在する状態になってしまい、メモリの使用率としては少ない状態であっても大きなアドレス空間が取れない状況が発生する。   In an electronic device including a storage device such as a semiconductor memory or a magnetic rotating disk, there is a technical demand for efficiently managing the memory. The memory secures (allocates) a necessary area at the time of use, and releases it after use to prepare for reuse. When such memory allocation / release operations are repeated, the usable memory space called fragmentation is in a state of being finely distributed in the address space, and the memory usage rate is low. However, a situation occurs in which a large address space cannot be obtained.

従来技術として、画像形成装置などのデータ処理装置において、フラグメンテーションの発生を少なくし、メモリの空き待ちやメモリ内のデータ移動等によるスループットの低下を起こさないメモリ管理方法を実現する以下の方法がある。ページ検出処理部がページ開始を検出すると、メモリ資源取得処理部がメモリを確保し、パーティション(パーテーション)分割が行われ、入力データ用および加工データ用のパーティション(パーテーション)にメモリ領域がそれぞれ確保される。データ加工処理部によって加工データが生成され加工データ用メモリ領域に格納されると、メモリ資源解放処理部によって、不要となるメモリ領域の解放が行われる。解放されたメモリ領域は、加工データ用パーティション(パーテーション)の空き領域の一部となる(特許文献1参照)。   As a conventional technique, in a data processing apparatus such as an image forming apparatus, there is the following method for realizing a memory management method that reduces the occurrence of fragmentation and does not cause a decrease in throughput due to waiting for memory space or data movement in the memory. . When the page detection processing unit detects the start of a page, the memory resource acquisition processing unit allocates memory, partition (partition) partitioning is performed, and memory areas are allocated in the input data and processed data partitions (partitions). The When the processing data is generated by the data processing unit and stored in the processing data memory area, the memory resource release processing unit releases an unnecessary memory area. The released memory area becomes a part of an empty area of the machining data partition (partition) (see Patent Document 1).

また、高い書き込み速度を実現可能なホスト機器を提供するために、管理システムがメモリ領域上で区画された単位領域を書き込みデータが記憶される書き込み領域として順次割り当てる機能を有し、単位領域の自然数倍の大きさからなる管理単位を割り当て位置の決定単位として用い、書き込み関数呼び出しを受けて管理単位ごとの実現可能な書き込み速度順に従って管理単位を前記書き込み領域として割り当てて、コントローラが、管理システムが割り当てた単位領域に書き込みデータを書き込む旨の指示をメモリカードに出す方法があった(特許文献2参照)。   In addition, in order to provide a host device capable of realizing a high writing speed, the management system has a function of sequentially allocating unit areas partitioned on the memory area as write areas for storing write data. A management unit having a size several times larger is used as a unit for determining an allocation position, and a management unit is allocated as the write area in accordance with a possible writing speed order for each management unit in response to a write function call. There is a method of giving an instruction to the memory card to write the write data in the unit area allocated by the method (see Patent Document 2).

しかし、特許文献1の方法では画像形成装置のページ単位毎の処理を前提としているため、複数ページに跨る処理には対応できない。また、パーテーションの区切りは2つという制限がある。さらに、パーテーションのサイズは、最初の割当時の容量で不足しても、その連続的メモリ空間の増量はできず、ひとつのパーテーションのサイズを減少する方向にしか容量変化に対応できない。   However, since the method of Patent Document 1 presupposes processing for each page of the image forming apparatus, it cannot cope with processing over a plurality of pages. In addition, there is a limit of two partition partitions. Furthermore, even if the partition size is insufficient with the capacity at the time of the first allocation, the continuous memory space cannot be increased, and the capacity change can be handled only in the direction of decreasing the size of one partition.

また、特許文献2の方法は、書き込みの際のメモリ割当に関するものであり、メモリが連続的に割当・解放動作を伴う際のフラグメンテーションの抑制には対応できない。
特開2002−351739号公報 特開2006−285669号公報
Further, the method of Patent Document 2 relates to memory allocation at the time of writing, and cannot cope with suppression of fragmentation when the memory is continuously allocated / released.
JP 2002-351739 A JP 2006-285669 A

解決しようとする問題点は、メモリ管理システム、電子機器及びメモリ管理プログラムにおいて、メモリのフラグメンテーションを効率的に回避することができなかった点と、高速に連続的なメモリ空間の割当・解放動作を行い、割当てられた連続的なメモリ空間のサイズの増減を行うことができなかった点である。   The problem to be solved is that in the memory management system, the electronic device and the memory management program, the memory fragmentation could not be efficiently avoided, and the continuous memory space allocation / release operation is performed at high speed. And the size of the allocated continuous memory space could not be increased or decreased.

本発明のメモリ管理システムは、論理アドレス空間においてアプリケーションが使用する仮想メモリの割当と解放を管理する論理パーテーション管理部と、物理アドレス空間において実メモリを小サイズ毎に切り分けて前記実メモリの割当と解放を管理する物理パーテーション管理部と、変換テーブルに基づき前記論理アドレス空間と前記物理アドレス空間との間のアドレス変換を行う変換部とを有することを特徴とする。   The memory management system of the present invention includes a logical partition management unit that manages allocation and release of virtual memory used by an application in a logical address space, and allocation of the real memory by dividing real memory into small sizes in a physical address space. A physical partition management unit that manages release, and a conversion unit that performs address conversion between the logical address space and the physical address space based on a conversion table.

また、本発明のメモリ管理システムの前記変換部は、前記論理アドレス空間と前記物理アドレス空間とを関連付ける、前記変換テーブルを生成又は消去することを特徴としてもよい。   The conversion unit of the memory management system of the present invention may generate or delete the conversion table that associates the logical address space with the physical address space.

また、本発明のメモリ管理システムの前記論理パーテーション管理部は、前記仮想メモリの割当をアプリケーション毎に連続した論理アドレス空間に確保することを特徴としてもよい。   Further, the logical partition management unit of the memory management system of the present invention may secure the allocation of the virtual memory in a continuous logical address space for each application.

また、本発明のメモリ管理システムの前記物理パーテーション管理部は、ハードウェア依存によるアクセス領域を固定領域とし、前記論理パーテーション管理部からの前記アプリケーションによる仮想メモリ割当てに対して、前記固定領域には割当を行わないことを特徴としてもよい。   In addition, the physical partition management unit of the memory management system of the present invention uses a hardware-dependent access area as a fixed area, and allocates to the fixed area with respect to virtual memory allocation by the application from the logical partition management unit. It is good also as not performing.

本発明の電子機器は、前記メモリ管理システムを有することを特徴とする。   An electronic apparatus according to the present invention includes the memory management system.

本発明のメモリ管理プログラムは、コンピュータに、論理アドレス空間においてアプリケーションが使用する仮想メモリの割当と解放を管理する論理パーテーション管理機能と、物理アドレス空間において実メモリを小サイズ毎に切り分けて前記実メモリの割当と解放を管理する物理パーテーション管理機能と、変換テーブルに基づいて前記論理アドレス空間と前記物理アドレス空間との間のアドレス変換を行う変換機能とを実現させることを特徴とする。   The memory management program of the present invention includes a logical partition management function for managing allocation and release of virtual memory used by an application in a logical address space in a computer, and dividing the real memory into small sizes in the physical address space. A physical partition management function for managing the allocation and release of the logical address, and a conversion function for performing address conversion between the logical address space and the physical address space based on a conversion table.

本発明のメモリ管理システムは、論理アドレス空間においてアプリケーションが使用する仮想メモリの割当と解放を管理する論理パーテーション管理部と、物理アドレス空間において実メモリを小サイズ毎に切り分けて前記実メモリの割当と解放を管理する物理パーテーション管理部と、変換テーブルに基づき前記論理アドレス空間と前記物理アドレス空間との間のアドレス変換を行う変換部とを有することを特徴とする。   The memory management system of the present invention includes a logical partition management unit that manages allocation and release of virtual memory used by an application in a logical address space, and allocation of the real memory by dividing real memory into small sizes in a physical address space. A physical partition management unit that manages release, and a conversion unit that performs address conversion between the logical address space and the physical address space based on a conversion table.

このため、論理アドレス空間におけるフラグメンテーションの効率を効率的に回避する。また、高速に連続的な仮想メモリ空間の割当、解放動作が可能となり、割当てられた連続的な仮想メモリ空間のサイズの増減を行うことが可能となる。   This effectively avoids fragmentation efficiency in the logical address space. In addition, it is possible to perform continuous virtual memory space allocation and release operations at high speed, and to increase or decrease the size of the allocated continuous virtual memory space.

また、本発明のメモリ管理システムの前記変換部は、前記論理アドレス空間と前記物理アドレス空間とを関連付ける、前記変換テーブルを生成又は消去することを特徴としてもよい。   The conversion unit of the memory management system of the present invention may generate or delete the conversion table that associates the logical address space with the physical address space.

このため、アプリケーションが使用する仮想メモリの論理アドレス空間から、実メモリの物理アドレス空間へのアドレス変換が効率よく行うことができる。   For this reason, the address conversion from the logical address space of the virtual memory used by the application to the physical address space of the real memory can be efficiently performed.

また、本発明のメモリ管理システムの前記論理パーテーション管理部は、前記仮想メモリの割当をアプリケーション毎に連続した論理アドレス空間に確保することを特徴としてもよい。   Further, the logical partition management unit of the memory management system of the present invention may secure the allocation of the virtual memory in a continuous logical address space for each application.

このため、アプリケーション毎に区切られたパーテーションを一度に解放することにより、仮想メモリの解放が高速に行うことが可能となり、かつ、連続した大きな論理アドレス空間を得ることが可能となる。   For this reason, by releasing partitions partitioned for each application at a time, the virtual memory can be released at a high speed, and a continuous large logical address space can be obtained.

また、本発明のメモリ管理システムの前記物理パーテーション管理部は、ハードウェア依存によるアクセス領域を固定領域とし、前記論理パーテーション管理部からの前記アプリケーションによる仮想メモリ割当てに対して、前記固定領域には割当を行わないことを特徴としてもよい。   In addition, the physical partition management unit of the memory management system of the present invention uses a hardware-dependent access area as a fixed area, and allocates to the fixed area with respect to virtual memory allocation by the application from the logical partition management unit. It is good also as not performing.

このため、DMA(Direct Memory Access)等のハードウェア依存アクセスがあっても、当該箇所が他のアプリケーション等に割当てられることがなく動作する。   For this reason, even if there is a hardware-dependent access such as DMA (Direct Memory Access), the location is operated without being assigned to another application or the like.

本発明の電子機器は、前記メモリ管理システムを有することを特徴とする。   An electronic apparatus according to the present invention includes the memory management system.

このため、論理アドレス空間におけるフラグメンテーションの発生を効率的に回避する。また、高速に連続的な仮想メモリ空間の割当、解放動作が可能となり、割当てられた連続的な仮想メモリ空間のサイズの増減を行うことが可能となる。また、アプリケーション毎に区切られたパーテーションを一度に解放することにより、仮想メモリの解放を高速に行うことが可能となり、かつ、連続した大きな論理アドレス空間を得ることが可能となる。また、DMA(Direct Memory Access)等のハードウェア依存アクセスがあっても、当該箇所が他のアプリケーション等に割当てられることがなく動作する。   For this reason, occurrence of fragmentation in the logical address space is efficiently avoided. In addition, it is possible to perform continuous virtual memory space allocation and release operations at high speed, and to increase or decrease the size of the allocated continuous virtual memory space. Further, by releasing partitions partitioned for each application at a time, it is possible to release virtual memory at high speed and obtain a continuous large logical address space. Also, even if there is a hardware-dependent access such as DMA (Direct Memory Access), the location is operated without being assigned to another application or the like.

本発明のメモリ管理プログラムは、コンピュータに、論理アドレス空間においてアプリケーションが使用する仮想メモリの割当と解放を管理する論理パーテーション管理機能と、物理アドレス空間において実メモリを小サイズ毎に切り分けて前記実メモリの割当と解放を管理する物理パーテーション管理機能と、変換テーブルに基づいて前記論理アドレス空間と前記物理アドレス空間との間のアドレス変換を行う変換機能とを実現させることを特徴とする。   The memory management program of the present invention includes a logical partition management function for managing allocation and release of virtual memory used by an application in a logical address space in a computer, and dividing the real memory into small sizes in the physical address space. A physical partition management function for managing the allocation and release of the logical address, and a conversion function for performing address conversion between the logical address space and the physical address space based on a conversion table.

このため、論理アドレス空間におけるフラグメンテーションの発生を効率的に回避する。また、高速に連続的な仮想メモリ空間の割当、解放動作が可能となり、割当てられた連続的な仮想メモリ空間のサイズの増減を行うことが可能となる。   For this reason, occurrence of fragmentation in the logical address space is efficiently avoided. In addition, it is possible to perform continuous virtual memory space allocation and release operations at high speed, and to increase or decrease the size of the allocated continuous virtual memory space.

メモリ管理システム、電子機器及びメモリ管理プログラムにおいて、メモリのフラグメンテーションを効率的に回避することができない問題点と、高速に連続的な仮想メモリ空間の割当、解放動作を行い、割当てられた連続的なメモリ空間のサイズの増減を行うことができない問題点を物理アドレス空間を小サイズ毎に区切ったマイクロパーテーション単位で扱い、アプリケーション等毎に区切った連続的な論理アドレス空間を必要数の前記マイクロパーテーションに割当てることによって解決した。   In memory management systems, electronic devices, and memory management programs, it is impossible to efficiently avoid memory fragmentation, and continuous virtual memory space allocation and release operations are performed at high speed. The problem that the size of the memory space cannot be increased or decreased is handled in units of micropartitions in which the physical address space is divided into small sizes, and the continuous logical address space divided in units of applications etc. is converted into the required number of micropartitions. Solved by assigning.

[パーテーション]
図1(A)は、従来のメモリ管理システムにおけるアドレス空間での実メモリの割り当てに関する説明図である。従来は、アドレス空間を単一のパーテーションとして区切り、これら単一のパーテーションをメモリ管理のAPI(Application Protocol Interface)によって、実メモリの割り当て(malloc())、解放(free())を行っていた。このようなメモリ管理の下では、実メモリの割当・解放を繰り返した結果として、図2(A)から図2(B)に示すように使用中、未使用中のアドレス空間が分散してフラグメンテーションを発生し、実メモリ内のデータ移動処理を行わなければ連続的な大容量の実メモリ空間を確保することができない。しかし、実メモリ内のデータ移動処理には時間がかかり、データ移動中は実メモリの使用が大きく制限されるため、画像形成装置などのリアルタイム処理が必要な電子機器では非常に問題となる。
[Partition]
FIG. 1A is an explanatory diagram relating to real memory allocation in an address space in a conventional memory management system. Conventionally, the address space is divided into single partitions, and these single partitions are allocated (malloc ()) and released (free ()) by using the memory management API (Application Protocol Interface). . Under such memory management, as a result of repeated allocation / release of real memory, as shown in FIGS. 2A to 2B, the used and unused address spaces are distributed and fragmentation is performed. Therefore, a continuous large-capacity real memory space cannot be secured unless data movement processing in the real memory is performed. However, the data movement process in the real memory takes time, and the use of the real memory is greatly restricted during the data movement, which is very problematic for an electronic device that requires real-time processing such as an image forming apparatus.

図1(B)は、本発明のメモリ管理システムにおける、物理アドレス空間をパーテーション毎に区切って使用する場合の物理アドレス空間の割当てに関する説明図である。図3(A)に示すように全体の物理アドレス空間を複数のパーテーション毎にIDを与えて区切り、IDをアプリケーション毎に関連付けて割当てるようにすると、ひとつのアプリケーションが終了した場合(図3(B)におけるID=2のアプリケーション)には、パーテーション2をID指定による一括解放(free_all(ID=2)、図1(B)参照)を行うことにより大きな連続アドレス空間を得ることができる。   FIG. 1B is an explanatory diagram relating to allocation of physical address space when the physical address space is divided into partitions and used in the memory management system of the present invention. As shown in FIG. 3A, when an entire physical address space is divided by giving an ID to each of a plurality of partitions and an ID is associated and assigned for each application, one application is terminated (FIG. 3B ) In ID = 2), a large continuous address space can be obtained by performing a batch release of partition 2 by specifying an ID (free_all (ID = 2), see FIG. 1B).

しかし、このパーテーションを区切る方法だけでは、最初に割当てられたパーテーションサイズと実際に使用されるメモリサイズとの間に大きな差異があった場合、特にパーテーションで割当てられた実メモリサイズでは、容量が足りなくなった場合には、連続した大きな物理アドレス空間を得ることはできない。   However, if there is a large difference between the partition size initially allocated and the memory size actually used, this method of partitioning alone will not provide sufficient capacity, especially with the actual memory size allocated by the partition. If it disappears, a continuous large physical address space cannot be obtained.

そこで、本発明ではアプリケーション側が要求する論理アドレス空間を、物理メモリ空間を小サイズに区切ったマイクロパーテーションの物理アドレス空間に変換することにより、前記の問題を解決した。   Therefore, the present invention solves the above problem by converting the logical address space required by the application side into a micropartition physical address space in which the physical memory space is divided into small sizes.

[構成]
図4は、本発明の実施例に係わるメモリ管理システムの機能ブロック図である。
[Constitution]
FIG. 4 is a functional block diagram of the memory management system according to the embodiment of the present invention.

メモリ管理部M10は、物理パーテーション管理部M17、変換部M19,論理パーテーション管理部M21の機能部を有する。   The memory management unit M10 includes functional units of a physical partition management unit M17, a conversion unit M19, and a logical partition management unit M21.

上記の各機能部は、物理アドレス空間での物理マイクロパーテーションM11にアクセスし、物理アドレスと論理アドレスの間の変換テーブルM13を生成又は消去し、論理アドレス空間での論理パーテーションM15にアクセスする。   Each of the above functional units accesses the physical micropartition M11 in the physical address space, generates or deletes the conversion table M13 between the physical address and the logical address, and accesses the logical partition M15 in the logical address space.

以下に各機能部毎にその動作について説明する。   The operation of each functional unit will be described below.

論理パーテーション管理部M21は、論理アドレス空間においてアプリケーションが使用する仮想メモリの割当を管理し、該仮想メモリ割当てについてはアプリケーション毎に連続した論理アドレスのパーテーション毎(論理パーテーションM15)に区切って管理する。   The logical partition management unit M21 manages allocation of virtual memory used by the application in the logical address space, and the virtual memory allocation is divided into logical address partitions (logical partition M15) that are consecutive for each application.

変換部M19は、論理アドレス空間と物理アドレス空間との間のアドレス変換を行う。アドレス変換には前記論理アドレス空間と前記物理アドレス空間とを関連付ける変換テーブルM13を用いる(詳細後述)。すなわち、変換部M19は、仮想メモリ及び実メモリの未使用領域を、それぞれ論理パーテーション管理部M19及び物理パーテーション管理部M17から取得し、前記論理アドレス空間に前記物理アドレス空間を関連付ける。変換部M19は、アプリケーションの使用状況に応じて、変換テーブルM13の生成と消去を行う。詳細には、変換部M19は、アプリケーションの起動や動作に伴う要求に応じて変換テーブルM13を生成し、アプリケーションの終了に応じて変換テーブルM13を消去する。   The conversion unit M19 performs address conversion between the logical address space and the physical address space. The address translation uses a translation table M13 that associates the logical address space with the physical address space (details will be described later). That is, the conversion unit M19 acquires unused areas of the virtual memory and the real memory from the logical partition management unit M19 and the physical partition management unit M17, respectively, and associates the physical address space with the logical address space. The conversion unit M19 generates and deletes the conversion table M13 according to the usage status of the application. Specifically, the conversion unit M19 generates a conversion table M13 in response to a request associated with activation or operation of the application, and deletes the conversion table M13 in response to the end of the application.

物理パーテーション管理部M17は、物理アドレス空間において実メモリを小サイズ毎の物理マイクロパーテーションM11に切り分けて実メモリの割当と解放を管理する。   The physical partition management unit M17 manages real memory allocation and release by dividing the real memory into physical micropartitions M11 for each small size in the physical address space.

[変換テーブル及びマイクロパーテーション]
図5を用いて変換テーブルについて説明する。
[Conversion table and micropartition]
The conversion table will be described with reference to FIG.

物理アドレス空間は、変換テーブルT01に示すように、サイズが0x0800(このサイズは、一例であって、その他のサイズであってもよい)毎のマイクロパーテーションに区切られている。各マイクロパーテーションは、どのアプリケーションによって使用されているかを示すIDを有し、その物理アドレス及び対応する論理アドレスの値を有する。   As shown in the conversion table T01, the physical address space is divided into micropartitions each having a size of 0x0800 (this size is an example and other sizes may be used). Each micropartition has an ID indicating which application is being used, and has a physical address and a corresponding logical address value.

例えばID=2のアプリケーションに使用されているマイクロパーテーションについてみると、変換テーブルT11に示すようにマイクロパーテーション番号=1がID=2での先頭のマイクロパーテーションであり、そのリンク先ポインタは次の変換テーブルT31でマイクロパーテーション番号=3を示し、次がマイクロパーテーション番号=6を示している。   For example, regarding the micropartition used in the application with ID = 2, as shown in the conversion table T11, the micropartition number = 1 is the first micropartition with ID = 2, and the link destination pointer is the next conversion. Table T31 shows micropartition number = 3, and the next shows micropartition number = 6.

このように、変換部M19は、物理パーテーション管理部M17によって物理アドレス空間ではとびとびに割当てられている実メモリの物理アドレスを連続した論理アドレスに変換することができる。更に、論理パーテーション管理部M15は、変換部M19から取得した変換された連続した論理アドレスを、仮想メモリ空間に割当てることが可能である。   In this way, the conversion unit M19 can convert the physical addresses of the real memory allocated in the physical address space by the physical partition management unit M17 into continuous logical addresses. Furthermore, the logical partition management unit M15 can assign the converted continuous logical addresses acquired from the conversion unit M19 to the virtual memory space.

図6(A)にID指定による実メモリ一括解放の場合を示す。この場合にマイクロパーテーション2は、グラフィックスアプリケーションによって占有されていたが、グラフィックアプリケーションが終了したため、その実メモリを必要としなくなる。そこで、物理パーテーション管理部M17は、ID=グラフィックスを指定してメモリの一括解放を行う。この場合、前記変換テーブルのT11からT61に示したようなリンク先ポインタを用いて、ID=グラフィックスに割当てられていた実メモリをすべて解放することが可能である。解放されたマイクロパーテーションは他のアプリケーションにより使用が可能である。   FIG. 6A shows a case of real memory batch release by ID designation. In this case, the micro partition 2 is occupied by the graphics application. However, since the graphics application is terminated, the real memory is not required. Therefore, the physical partition management unit M17 designates ID = graphics and releases the memory all at once. In this case, it is possible to release all the real memory allocated to ID = graphics by using the link destination pointer as shown in T11 to T61 of the conversion table. The released micropartition can be used by other applications.

図6(B)に最初に割当てられた実メモリのパーテーションを再割当する場合についての図を示す。最初に物理パーテーション管理部M17により割当てられた物理メモリ空間が足りなくなった場合には、未使用であったマイクロパーテーション5をID=グラフィックスのために割当てる。この場合、物理アドレス空間は、とびとびに存在するが、論理アドレス空間は連続的に存在する。   FIG. 6B is a diagram showing the case of reallocating the partition of the real memory that is initially allocated. When the physical memory space allocated by the physical partition management unit M17 is insufficient at first, the unused micro partition 5 is allocated for ID = graphics. In this case, the physical address space exists in a discrete manner, but the logical address space exists continuously.

図6(C)では、新規にマイクロパーテーションを複数割当てる場合について説明する。割当てに必要なアドレス空間がマイクロパーテーションのひとつのサイズより大きい場合には、例えば図のようにマイクロパーテーション3,4,5の3つを割当てるようにしてもよい。   FIG. 6C illustrates a case where a plurality of new micropartitions are assigned. If the address space required for allocation is larger than one micropartition size, for example, three micropartitions 3, 4, and 5 may be allocated as shown in the figure.

図7を用いて、物理アドレス空間ではマイクロパーテーションの使用空間が分散して存在している場合でも、連続した論理アドレス空間が得られることを説明する。図7では、例えばID=インタープリタのアプリケーションは、その使用実メモリがマイクロパーテーションの1,6,9に分散して存在している。しかしながら、変換部M19が前記した変換テーブルM13を用いて物理アドレスと論理アドレス間のアドレス変換を行うために、論理パーテーション管理部M21へは、常に連続したメモリ空間への論理アドレスでのアクセスが可能である。グラフィックス及びレンダリングのアプリケーションについても同様にメモリ管理される。   With reference to FIG. 7, it will be described that a continuous logical address space can be obtained even when the micropartition usage space is distributed in the physical address space. In FIG. 7, for example, an ID = interpreter application has its actual memory distributed in micropartitions 1, 6, and 9. However, since the conversion unit M19 performs address conversion between a physical address and a logical address using the conversion table M13, the logical partition management unit M21 can always be accessed with a logical address to a continuous memory space. It is. Memory management is similarly performed for graphics and rendering applications.

図8を用いて、特定のマイクロパーテーションを固定メモリ領域に指定する例について示す。実メモリのアドレス空間においては、DMA(Direct Memory Access)などのハードウェアから直接メモリ空間をアクセスする場合などがあるが、本メモリ管理システムにおいて、そのようなハードウェア依存アクセスがあっても、問題なく動作する。その場合は、変換部M19は、変換テーブルM13中の該当マイクロパーテーションにID=ハードウェア依存のようなマークを付ける。当該IDを有するマイクロパーテーションは固定領域であるために、物理パーテーション管理部M17は、論理パーテーション管理部M21からのメモリ割当要求がきても、該当部分(固定領域)には割当を行わない。図8に示すように、論理パーテーション管理部M21に割当て要求があったアプリケーションのインタープリタ、グラフィックス、レンダリングのいずれも、ID=ハードウェア依存のマイクロパーテーション領域(固定領域)を避けてメモリの物理アドレスの割り当てを行うために、これらDMA等によってアクセスされる領域との競合は生じない。   An example in which a specific micropartition is designated as a fixed memory area will be described with reference to FIG. In the real memory address space, there are cases where the memory space is accessed directly from hardware such as DMA (Direct Memory Access). However, even if there is such hardware-dependent access in this memory management system, there is a problem. Work without. In this case, the conversion unit M19 puts a mark such as ID = hardware dependency on the corresponding micropartition in the conversion table M13. Since the micro partition having the ID is a fixed area, the physical partition management unit M17 does not allocate to the corresponding part (fixed area) even if a memory allocation request is received from the logical partition management unit M21. As shown in FIG. 8, the interpreter, graphics, and rendering of the application requested to be allocated to the logical partition management unit M21 all avoid the ID = hardware-dependent micropartition area (fixed area) and the physical address of the memory. Therefore, contention with the area accessed by these DMAs does not occur.

[実施例の効果]
本発明実施例のメモリ管理システムにより、以下のことが可能となる。
[Effect of Example]
The memory management system according to the embodiment of the present invention enables the following.

フラグメンテーションを効率的に回避することが可能となる。   It becomes possible to avoid fragmentation efficiently.

フラグメンテーションを回避する為の手段であるパーテーションを複数化することが可能となる。   A plurality of partitions, which are means for avoiding fragmentation, can be used.

フラグメンテーションを回避する為の手段であるパーテーションの区切り位置を動的に変更することが可能となる。   It becomes possible to dynamically change the partitioning position of the partition, which is a means for avoiding fragmentation.

メモリの解放順序に制限を必要とせず、不要になったメモリから解放可能となる。   It is possible to release from the memory that is no longer needed without restricting the memory release order.

従来例と本発明実施例のパーテーションの違いを示す説明図である。It is explanatory drawing which shows the difference of the partition of a prior art example and this invention Example. 従来例のパーテーションのメモリ割当ての図である。It is a figure of the memory allocation of the partition of a prior art example. 本実施例のパーテーションのメモリ割当ての図である。It is a figure of the memory allocation of the partition of a present Example. 本発明実施例のメモリ管理システムの機能ブロック図である。It is a functional block diagram of a memory management system of an embodiment of the present invention. 本発明実施例の変換テーブルの例である。It is an example of the conversion table of the Example of this invention. 本発明実施例のマイクロパーテーションの使用例の説明図である。It is explanatory drawing of the usage example of the micro partition of this invention Example. 本発明実施例のマイクロパーテーションのサイズ確保の例の説明図である。It is explanatory drawing of the example of the size ensuring of the micro partition of this invention Example. 本発明実施例のマイクロパーテーションの固定領域の説明図である。It is explanatory drawing of the fixed area | region of the micro partition of this invention Example.

符号の説明Explanation of symbols

M10 メモリ管理部(メモリ管理システム)
M13 変換テーブル
M17 物理パーテーション管理部
M19 変換部
M21 論理パーテーション管理部
M10 Memory management unit (memory management system)
M13 conversion table M17 physical partition management unit M19 conversion unit M21 logical partition management unit

Claims (6)

論理アドレス空間においてアプリケーションが使用する仮想メモリの割当と解放を管理する論理パーテーション管理部と、
物理アドレス空間において実メモリを小サイズ毎に切り分けて前記実メモリの割当と解放を管理する物理パーテーション管理部と、
前記論理アドレス空間と前記物理アドレス空間との間のアドレス変換を行う変換部とを有する
ことを特徴とするメモリ管理システム。
A logical partition manager that manages allocation and release of virtual memory used by applications in the logical address space;
A physical partition manager that manages allocation and release of the real memory by dividing the real memory into small sizes in the physical address space;
A memory management system comprising: a conversion unit that performs address conversion between the logical address space and the physical address space.
請求項1のメモリ管理システムであって、
前記変換部は、前記論理アドレス空間と前記物理アドレス空間とを関連付ける変換テーブルを生成又は消去する
ことを特徴とするメモリ管理システム。
The memory management system of claim 1,
The memory management system, wherein the conversion unit generates or deletes a conversion table that associates the logical address space with the physical address space.
請求項1または2のメモリ管理システムであって、
前記論理パーテーション管理部は、前記仮想メモリの割当をアプリケーション毎に連続した論理アドレス空間に確保する
ことを特徴とするメモリ管理システム。
The memory management system according to claim 1 or 2, wherein
The logical partition management unit secures allocation of the virtual memory in a continuous logical address space for each application.
請求項1から3のいずれかのメモリ管理システムであって、
前記物理パーテーション管理部は、ハードウェア依存によるアクセス領域を固定領域とし、前記論理パーテーション管理部からの前記アプリケーションによる仮想メモリ割当に対して、前記固定領域には割当を行わない
ことを特徴とするメモリ管理システム。
The memory management system according to any one of claims 1 to 3,
The physical partition management unit sets a hardware-dependent access area as a fixed area, and does not perform allocation to the fixed area in response to virtual memory allocation by the application from the logical partition management unit. Management system.
請求項1から4のいずれかのメモリ管理システムを有する
ことを特徴とする電子機器。
An electronic apparatus comprising the memory management system according to claim 1.
コンピュータに、
論理アドレス空間においてアプリケーションが使用する仮想メモリの割当と解放を管理する論理パーテーション管理機能と、
物理アドレス空間において実メモリを小サイズ毎に切り分けて前記実メモリの割当と解放を管理する物理パーテーション管理機能と、
変換テーブルに基づき前記論理アドレス空間と前記物理アドレス空間との間のアドレス変換を行う変換機能とを実現させる
ことを特徴とするメモリ管理プログラム。
On the computer,
A logical partition management function for managing allocation and release of virtual memory used by applications in the logical address space;
A physical partition management function that manages allocation and release of the real memory by dividing the real memory into small sizes in the physical address space;
A memory management program for realizing a conversion function for performing address conversion between the logical address space and the physical address space based on a conversion table.
JP2008279210A 2008-10-30 2008-10-30 Memory management system, electronic equipment and memory management program Pending JP2010108216A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2008279210A JP2010108216A (en) 2008-10-30 2008-10-30 Memory management system, electronic equipment and memory management program
US12/607,673 US8291192B2 (en) 2008-10-30 2009-10-28 Memory management system
US13/606,784 US8539198B2 (en) 2008-10-30 2012-09-07 Memory management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008279210A JP2010108216A (en) 2008-10-30 2008-10-30 Memory management system, electronic equipment and memory management program

Publications (1)

Publication Number Publication Date
JP2010108216A true JP2010108216A (en) 2010-05-13

Family

ID=42297614

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008279210A Pending JP2010108216A (en) 2008-10-30 2008-10-30 Memory management system, electronic equipment and memory management program

Country Status (1)

Country Link
JP (1) JP2010108216A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022552141A (en) * 2019-10-11 2022-12-15 インターナショナル・ビジネス・マシーンズ・コーポレーション Virtual memory metadata management

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008513911A (en) * 2004-09-30 2008-05-01 キョウセラ ワイヤレス コープ. Memory manager for embedded systems
WO2008084531A1 (en) * 2007-01-10 2008-07-17 Netcleus Systems Corporation Memory management apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008513911A (en) * 2004-09-30 2008-05-01 キョウセラ ワイヤレス コープ. Memory manager for embedded systems
WO2008084531A1 (en) * 2007-01-10 2008-07-17 Netcleus Systems Corporation Memory management apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022552141A (en) * 2019-10-11 2022-12-15 インターナショナル・ビジネス・マシーンズ・コーポレーション Virtual memory metadata management
JP7394978B2 (en) 2019-10-11 2023-12-08 インターナショナル・ビジネス・マシーンズ・コーポレーション Virtual memory metadata management

Similar Documents

Publication Publication Date Title
CN107491351B (en) Resource allocation method, device and equipment based on priority
US20230196502A1 (en) Dynamic kernel memory space allocation
US8478926B1 (en) Co-processing acceleration method, apparatus, and system
JP2007257636A (en) Method, system and computer program for allocating dma address space
JP2007141226A (en) System, method and program for allocating shared memory
KR20090079012A (en) Method and apparatus for save/restore state of virtual machine
JP2007026094A (en) Execution device and application program
US8352702B2 (en) Data processing system memory allocation
JP2005353070A5 (en)
US7865632B2 (en) Memory allocation and access method and device using the same
JP6231899B2 (en) Semiconductor device, processor system, and control method thereof
JP5087954B2 (en) Memory management device
US20120066470A1 (en) Method and system for allocating memory to a pipeline
JP2010108216A (en) Memory management system, electronic equipment and memory management program
JP2005322049A (en) Image processor and program
JP5352284B2 (en) MEMORY MANAGEMENT SYSTEM, ELECTRONIC DEVICE, AND MEMORY MANAGEMENT PROGRAM
JP2008033838A (en) Memory management device and memory management method
JP5377001B2 (en) MEMORY MANAGEMENT SYSTEM, ELECTRONIC DEVICE, AND MEMORY MANAGEMENT PROGRAM
KR20150048028A (en) Managing Data Transfer
JP7080698B2 (en) Information processing equipment
US11960723B2 (en) Method and system for managing memory associated with a peripheral component interconnect express (PCIE) solid-state drive (SSD)
JP2000293476A (en) System for resource allocation to pci device and its method
JP2003248620A (en) Dynamic memory managing method and dynamic memory management information processing device
JPWO2010082604A1 (en) Data processing apparatus, memory management method, and memory management program
WO2014030213A1 (en) Mac address management device and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110322

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121219

A02 Decision of refusal

Effective date: 20130507

Free format text: JAPANESE INTERMEDIATE CODE: A02