JP2010277268A - Memory management device and one-chip microcomputer equipped with the same and integrated system - Google Patents

Memory management device and one-chip microcomputer equipped with the same and integrated system Download PDF

Info

Publication number
JP2010277268A
JP2010277268A JP2009128112A JP2009128112A JP2010277268A JP 2010277268 A JP2010277268 A JP 2010277268A JP 2009128112 A JP2009128112 A JP 2009128112A JP 2009128112 A JP2009128112 A JP 2009128112A JP 2010277268 A JP2010277268 A JP 2010277268A
Authority
JP
Japan
Prior art keywords
area
size
areas
memory
management device
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
JP2009128112A
Other languages
Japanese (ja)
Inventor
Ko Endo
航 遠藤
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 JP2009128112A priority Critical patent/JP2010277268A/en
Publication of JP2010277268A publication Critical patent/JP2010277268A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To efficiently and quickly perform defragmentation in one heap region by a simple configuration. <P>SOLUTION: In a first stage, a region under use existing in a region which is smaller in size between two regions SZ1 and SZ2 is rearranged first (S22, S23, S33). In second stage processing (S24 to S27, S34 to S37), in the region which is smaller in size between the two regions SZ1 and SZ2, the region under use in the region which is larger in size is further rearranged. In a third stage, when it is possible (S28, S38), the region E under use whose maximum size is SZum is rearranged in the region which is smaller in size between the two regions SZ1 and SZ2. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、メモリデフラグメンテーションを行うメモリ管理装置及びこれを備えたワンチップマイクロコンピュータ並びに組込システムに関する。   The present invention relates to a memory management device that performs memory defragmentation, a one-chip microcomputer including the memory management device, and an embedded system.

組込システムでは、ワンチップマイクロコンピュータを用いてリアルタイム処理を行っている。   In the embedded system, real-time processing is performed using a one-chip microcomputer.

一方、メモリを効率良く使用するために、ヒープ領域にメモリを動的に確保し、不要になったら解放することが行われている。   On the other hand, in order to use the memory efficiently, the memory is dynamically secured in the heap area and released when it becomes unnecessary.

このため、メモリのフラグメンテーションが生じ、特に補助記憶装置を用いない組込システムでは、メモリデフラグメンテーションを高速に行って、リアルタイム性を確保する必要がある。   For this reason, memory fragmentation occurs, and particularly in an embedded system that does not use an auxiliary storage device, it is necessary to perform memory defragmentation at high speed to ensure real-time performance.

下記特許文献1では、この要求を満たすために、複数のメモリプールを用いている。
特開2002−32234号公報
In the following Patent Document 1, a plurality of memory pools are used to satisfy this requirement.
JP 2002-32234 A

しかしながら、複数のメモリプールを使用すると、それぞれの空き領域を連続させて使用することができないので、メモリ使用効率が低下する。特にワンチップマイクロコンピュータでは、メモリの記憶容量が比較的少ないので、メモリ使用効率を高める必要がある。   However, if a plurality of memory pools are used, each free area cannot be used continuously, so that the memory usage efficiency is lowered. In particular, in a one-chip microcomputer, since the storage capacity of the memory is relatively small, it is necessary to increase the memory usage efficiency.

本発明の目的は、このような問題点に鑑み、1つのヒープ領域におけるデフラグメンテーションを簡単な構成で効率よくより高速に行うことが可能なメモリ管理装置及びこれを備えたワンチップマイクロコンピュータ並びに組込システムを提供することにある。   In view of such problems, an object of the present invention is to provide a memory management device capable of performing defragmentation in one heap area efficiently and at high speed with a simple configuration, a one-chip microcomputer including the same, and a set Providing an embedded system.

本発明の第1態様では、物理メモリ上のヒープ領域を管理するメモリ管理装置において、
該ヒープ領域における複数の使用中領域のうち最大サイズのものの両端のそれぞれから該ヒープ領域の同一側端までの2領域中サイズが小さい方の領域内に、該最大サイズの使用中領域以外の使用中領域の全部又は一部を、所定順に再配置してデフラグメンテーションを行う管理手段を有する。
In the first aspect of the present invention, in a memory management device that manages a heap area on a physical memory,
Among the plurality of used areas in the heap area, the areas other than the used area of the maximum size are used in the area having the smaller size in the two areas from both ends of the one having the maximum size to the same side edge of the heap area. Management means for performing defragmentation by rearranging all or part of the middle region in a predetermined order.

本発明によるメモリ管理装置の第2態様では、第1態様において、該管理手段は、第1段階として、該2領域中サイズが小さい方の領域内に存在する使用中領域を先に、該最大サイズの使用中領域にアドレス上近い方から順に再配置する。   In a second aspect of the memory management device according to the present invention, in the first aspect, the management means, as the first step, starts with the used area existing in the smaller area in the two areas first, Relocation is performed in order from the address closest to the size in-use area.

本発明によるメモリ管理装置の第3態様では、第2態様において、該管理手段はさらに、該第1段階の再配置完了後に第2段階として、該2領域中サイズが大きい方の領域内の使用中領域を所定順に、該2領域中サイズが小さい方の領域内の未使用中領域に再配置し、再配置できないものは、該2領域中サイズが大きい方の領域内に、該最大サイズの使用中領域にアドレス上近い方から順に再配置する。   In a third aspect of the memory management device according to the present invention, in the second aspect, the management means further uses the area within the larger one of the two areas as a second stage after the rearrangement of the first stage is completed. The middle area is rearranged in the predetermined order in the unused middle area in the smaller area of the two areas, and those that cannot be rearranged are placed in the larger area in the larger area of the two areas. Relocate to the busy area in order from the closest address.

本発明によるメモリ管理装置の第4態様では、第3態様において、該管理手段はさらに、該第2段階の再配置完了後に、該2領域中サイズが小さい方の領域内の未使用中領域のサイズが、該最大サイズの使用中領域のそれ以上であれば、該最大サイズの使用中領域をこの未使用中領域内に再配置する。   In a fourth aspect of the memory management device according to the present invention, in the third aspect, after the rearrangement in the second stage is completed, the management means further includes an unused area in the area with the smaller size in the two areas. If the size is larger than the maximum size of the used area, the maximum size of the used area is rearranged in the unused area.

上記第1態様の構成によれば、最大サイズの使用領域を再配置しなくてもよく、しかも、2領域中サイズが小さい方の領域内にこれ以外の使用中領域の全部又は一部を再配置するので、簡単な処理で比較的大きな空き領域を効率よく短時間で得ることができ、リアルタイム処理を確保可能となるという効果を奏する。換言すれば、よりパフォーマンスの低い安価なプロセッサを用いることが可能となるという効果を奏する。   According to the configuration of the first aspect described above, it is not necessary to rearrange the use area having the maximum size, and all or a part of the other use areas are relocated within the smaller area of the two areas. Since it is arranged, a relatively large free area can be obtained efficiently and in a short time with simple processing, and real-time processing can be secured. In other words, there is an effect that an inexpensive processor with lower performance can be used.

上記第2態様の構成によれば、第1段階として、該2領域中サイズが小さい方の領域内に存在する使用中領域を先に再配置するので、再配置可能か否かを判断することなく確実に再配置でき、処理効率が高いという効果を奏する。   According to the configuration of the second aspect, as the first stage, the used area existing in the area having the smaller size in the two areas is rearranged first, so it is determined whether or not the rearrangement is possible. It can be reliably rearranged, and the processing efficiency is high.

上記第3態様の構成によれば、該第1段階の再配置完了後の第2段階の処理により、該2領域中サイズが小さい方の領域内にさらに該2領域中サイズが大きい方の領域内の使用中領域が再配置されるので、より大きな空き領域を得ることができるという効果を奏する。   According to the configuration of the third aspect, the region having the larger size in the two regions is further within the region having the smaller size in the two regions by the processing in the second step after completion of the rearrangement in the first step. Since the in-use area is rearranged, a larger free area can be obtained.

上記第4態様の構成によれば、該第2段階の再配置完了後に、可能であれば該最大サイズの使用中領域が該2領域中サイズが小さい方の領域内に再配置されるので、さらに大きな空き領域を効率よく簡単に得ることができるという効果を奏する。   According to the configuration of the fourth aspect, after the rearrangement in the second stage is completed, if possible, the used area of the maximum size is rearranged in the area with the smaller size in the two areas. In addition, there is an effect that a large empty area can be obtained efficiently and easily.

本発明の他の目的、構成及び効果は以下の説明から明らかになる。   Other objects, configurations and effects of the present invention will become apparent from the following description.

図6は、本発明が適用される組込システム1の概略ブロック図である。   FIG. 6 is a schematic block diagram of the embedded system 1 to which the present invention is applied.

この組込システム1は、制御対象2をワンチップマイクロコンピュータ10でリアルタイム制御している。   In this embedded system 1, the controlled object 2 is controlled in real time by the one-chip microcomputer 10.

ワンチップマイクロコンピュータ10では、MPU11がバス12を介してROM13、RAM14、周辺回路15及びI/Oインタフェース16と結合されている。   In the one-chip microcomputer 10, the MPU 11 is coupled to the ROM 13, RAM 14, peripheral circuit 15, and I / O interface 16 via the bus 12.

ROM13は、例えばフラッシュメモリであり、OS(オペレーティングシステム)及びアプリケーションが格納されている。RAM14は、ワークエリアとして用いられる。高速処理のため、起動時にROM13内のプログラムの一部又は全部を、RAM14上にコピーして、RAM14内からアプリケーションを起動してもよい。周辺回路15は、ADC(アナログ/デジタルコンバータ)、DAC(デジタル/アナログコンバータ)及びDMAC(ダイレクトメモリアクセスコントローラ)などを備えている。I/Oインタフェース16は、制御対象2に結合されている。   The ROM 13 is a flash memory, for example, and stores an OS (operating system) and applications. The RAM 14 is used as a work area. For high-speed processing, a part or all of the program in the ROM 13 may be copied onto the RAM 14 at the time of activation, and the application may be activated from the RAM 14. The peripheral circuit 15 includes an ADC (analog / digital converter), a DAC (digital / analog converter), a DMAC (direct memory access controller), and the like. The I / O interface 16 is coupled to the control target 2.

図5は、メモリデフラグメンテーションに関係した部分の機能ブロック図である。   FIG. 5 is a functional block diagram of a portion related to memory defragmentation.

ROM13内のアプリケーションは、その一部がメインスレッド20として機能し、RAM14内に子スレッド21〜23を動的に生成し、これらで2内の複数部を並列にリアルタイム制御する。スレッド20〜23はそれぞれ、OSのメモリ管理部30を介して、ヒープ領域31内にメモリ(記憶領域)を動的に確保したり解放したりする。   A part of the application in the ROM 13 functions as the main thread 20, and the child threads 21 to 23 are dynamically generated in the RAM 14, and a plurality of parts in the two are controlled in real time in parallel. Each of the threads 20 to 23 dynamically secures or releases a memory (storage area) in the heap area 31 via the memory management unit 30 of the OS.

メモリ管理部30は、このメモリを確保する際に、メモリ管理リスト32の未使用リスト321を参照して使用中領域を決定し、その先頭アドレスとサイズとを記入した要素を、使用中リスト322に連結する。メモリを解放する際には、使用中リスト322中の対応する要素を抜き出して未使用リスト321に連結する。これらリストは当業者に周知のものであり、その詳細説明を省略する。また、アドレスが連続する未使用領域のリスト要素を、1つの要素に纏める。メモリデフラグメンテーション部303は、メモリ割当部301で用いられる。   When the memory management unit 30 secures the memory, the memory management unit 30 refers to the unused list 321 of the memory management list 32 to determine the used area, and uses the element in which the start address and size are written as the used list 322. Connect to When releasing the memory, the corresponding element in the in-use list 322 is extracted and linked to the unused list 321. These lists are well known to those skilled in the art and will not be described in detail. In addition, list elements of unused areas having consecutive addresses are combined into one element. The memory defragmentation unit 303 is used in the memory allocation unit 301.

図1は、メモリ割当部301による処理を示す概略フローチャートである。以下、括弧内は図中のステップ識別符号である。   FIG. 1 is a schematic flowchart showing processing by the memory allocation unit 301. In the following, the step identification codes in the figure are shown in parentheses.

(S0)未使用リスト321を参照して、要求されるサイズ以上の未使用領域を検出する。   (S0) Referring to the unused list 321, an unused area having a size larger than the required size is detected.

(S1)ステップS0で検出できればステップS4へ進み、そうでなければステップS2へ進む。   (S1) If it can be detected in step S0, the process proceeds to step S4. Otherwise, the process proceeds to step S2.

(S2)ヒープ領域31を拡大可能であればこれを拡大する。また、以下で使用するフラグFに0を代入する。   (S2) If the heap area 31 can be expanded, it is expanded. Also, 0 is assigned to the flag F used below.

(S3)サイズSZ2での拡大により、要求されたサイズのメモリを確保可能であればステップS4へ進み、そうでなければステップS5へ進む。   (S3) If the memory of the requested size can be secured by enlargement with the size SZ2, the process proceeds to step S4, and if not, the process proceeds to step S5.

(S4)未使用リスト321及び使用中リスト322に対し上述の処理を行って、要求されたメモリを確保する。   (S4) The above-described processing is performed on the unused list 321 and the in-use list 322 to secure the requested memory.

(S5)F=0であればステップS6へ進み、そうでなければステップS8へ進む。   (S5) If F = 0, the process proceeds to step S6. Otherwise, the process proceeds to step S8.

(S6)メモリデフラグメンテーション部303を介して、ヒープ領域31に対し、後述のデフラグメンテーションを行う。   (S6) Defragmentation described later is performed on the heap area 31 via the memory defragmentation unit 303.

(S7)フラグFに1を代入し、ステップS3へ戻る。   (S7) Substitute 1 for the flag F and return to step S3.

(S8)要求されたサイズのメモリを確保できなかったことを要求元に知らせるために、関数の戻り値としてNULLを返す。   (S8) In order to inform the request source that the memory of the requested size could not be secured, NULL is returned as the return value of the function.

図2は、ステップS6の詳細フローチャートである。   FIG. 2 is a detailed flowchart of step S6.

(S20)使用中リスト322を参照して、使用中領域の最大サイズSZumを検出する。   (S20) Referring to the in-use list 322, the maximum size SZum of the in-use area is detected.

例えば図5のヒープ領域31の場合、使用中領域Eのサイズが最大サイズSZumとして検出される。   For example, in the case of the heap area 31 in FIG. 5, the size of the in-use area E is detected as the maximum size SZum.

(S21)図5に示すように、この最大サイズSZumの領域の両端のそれぞれと、ヒープ領域31の同一端側との間の2領域のそれぞれのサイズSZ1及びSZ2を求める。   (S21) As shown in FIG. 5, the respective sizes SZ1 and SZ2 of the two areas between the both ends of the area of the maximum size SZum and the same end side of the heap area 31 are obtained.

(S22)SZ1>SZ2であればステップS23へ進み、そうでなければステップS33へ進む。   (S22) If SZ1> SZ2, proceed to step S23, otherwise proceed to step S33.

(S23)第1段階のデフラグメンテーションとして、サイズSZ2側の各使用中領域を、最大サイズSZumの領域に近いほうから順に詰めて再配置する。これにより、図5の場合、図3(A)に示す如くなる。   (S23) As the first stage of defragmentation, the areas in use on the size SZ2 side are arranged and rearranged in order from the closest to the area of the maximum size SZum. Thereby, in the case of FIG. 5, it becomes as shown in FIG.

(S24)サイズSZ1側に使用中領域が存在すればステップS25へ進み、そうでなければステップS28へ進む。   (S24) If a used area exists on the size SZ1 side, the process proceeds to step S25, and if not, the process proceeds to step S28.

(S25)サイズSZ1側の最大サイズSZumに最も近い使用中領域がサイズSZ2側の現在の未使用領域のサイズ以下であればステップS26へ進み、そうでなければステップS27へ進む。   (S25) If the used area closest to the maximum size SZum on the size SZ1 side is equal to or smaller than the size of the current unused area on the size SZ2 side, the process proceeds to step S26, and if not, the process proceeds to step S27.

(S26)この使用中領域を、サイズSZ2側の現在の未使用領域に、最大サイズSZum側へ詰めて再配置する。次にステップS24へ戻る。ステップS24〜S26の処理の繰り返しにより、図3(B)に示す状態となる。   (S26) This in-use area is rearranged in the current unused area on the size SZ2 side in the maximum size SZum side. Next, the process returns to step S24. By repeating the processing of steps S24 to S26, the state shown in FIG.

(S27)この使用中領域を、サイズSZ1側の現在の未使用領域に、最大サイズSZum側へ詰めて再配置する。次にステップS24へ戻る。ステップS24、S25及びS27の処理の繰り返しにより、図3(C)に示す状態となる。   (S27) This in-use area is rearranged in the current unused area on the size SZ1 side in the maximum size SZum side. Next, the process returns to step S24. By repeating the processes of steps S24, S25, and S27, the state shown in FIG.

(S28)サイズSZ2側の余白が最大サイズSZum以上であればステップS29へ進み、そうでなければデフラグメンテーション処理を終了する。   (S28) If the margin on the size SZ2 side is greater than or equal to the maximum size SZum, the process proceeds to step S29; otherwise, the defragmentation process is terminated.

図3(C)の場合にはステップS28で否定判定され、図4(A)の場合にはステップS28で肯定判定される。   In the case of FIG. 3C, a negative determination is made in step S28, and in the case of FIG. 4A, a positive determination is made in step S28.

(S29)最大サイズSZumの領域を、サイズSZ2側の現在の未使用領域に、最大サイズSZumの領域側へ詰めて再配置する。これにより、図4(B)に示す如くなる。   (S29) The area of the maximum size SZum is rearranged in the current unused area on the side of the size SZ2 in the area of the maximum size SZum. Thereby, it becomes as shown in FIG.

ステップS33〜S39の処理はそれぞれ、ステップS23〜S29の処理においてサイズSZ1とSZ2とを入れ替えた処理と同一であり、その説明を省略する。   The processing in steps S33 to S39 is the same as the processing in which the sizes SZ1 and SZ2 are replaced in the processing in steps S23 to S29, and the description thereof is omitted.

本実施例1によれば、最大サイズSZumの使用領域Eを再配置しなくてもよく、しかも、2領域SZ1及びSZ2中サイズが小さい方の領域内にこれ以外の使用中領域の全部又は一部を簡単なアルゴリズムで再配置するので、比較的大きな空き領域を短時間で得ることができ、リアルタイム処理を確保可能となるという効果を奏する。換言すれば、よりパフォーマンスの低い安価なワンチップマイクロコンピュータ10を用いることが可能となるという効果を奏する。   According to the first embodiment, the use area E having the maximum size SZum may not be rearranged, and all or one of the other use areas may be included in the smaller area in the two areas SZ1 and SZ2. Since the parts are rearranged by a simple algorithm, a relatively large free area can be obtained in a short time, and the real-time processing can be ensured. In other words, there is an effect that an inexpensive one-chip microcomputer 10 with lower performance can be used.

また、第1段階として、2領域SZ1及びSZ2中サイズが小さい方の領域内に存在する使用中領域を先に再配置するので(S22、S23、S33)、再配置可能か否かを判断することなく確実に再配置でき、処理効率が高いという効果を奏する。   Further, as the first stage, since the used areas existing in the smaller area in the two areas SZ1 and SZ2 are rearranged first (S22, S23, S33), it is determined whether or not the rearrangement is possible. It is possible to relocate without fail, and there is an effect that the processing efficiency is high.

さらに、この第1段階の再配置完了後の第2段階の処理(S24〜S27、S34〜S37)により、2領域SZ1及びSZ2中サイズが小さい方の領域内にさらに、サイズが大きい方の領域内の使用中領域が再配置されるので、より大きな空き領域を得ることができるという効果を奏する。   Further, by the second stage processing (S24 to S27, S34 to S37) after completion of the rearrangement of the first stage, the larger area is further within the smaller area in the two areas SZ1 and SZ2. Since the in-use area is rearranged, a larger free area can be obtained.

また、この第2段階の再配置完了後に、可能であれば(S28、S38)最大サイズSZumの使用中領域Eが2領域SZ1及びSZ2中サイズが小さい方の領域内に再配置されるので(図4)、さらに大きな空き領域を効率よく得ることができるという効果を奏する。   Further, after the completion of the rearrangement in the second stage (S28, S38), if possible, the in-use area E of the maximum size SZum is rearranged in the area of the smaller area of the two areas SZ1 and SZ2 ( 4), there is an effect that a larger free space can be obtained efficiently.

本発明の好適な実施例を説明したが、本発明には他にも種々の変形例が含まれ、上記複数の実施例で述べた構成要素の他の組み合わせ、各構成要素の機能を実現する他の構成を用いたもの、当業者であればこれらの構成又は機能から想到するであろう他の構成も、本発明に含まれる。   Although the preferred embodiment of the present invention has been described, the present invention includes various other modifications, and realizes other combinations of the components described in the above-described embodiments and the functions of the components. Other configurations using other configurations, and other configurations that would be conceived by those skilled in the art from these configurations or functions, are also included in the present invention.

例えば、上記実施例ではリアルタイム性の高い処理として複数スレッドのそれぞれでヒープ領域31内にメモリを確保する場合を説明したが、複数プロセスのそれぞれでヒープ領域31内にメモリを確保したり、単一プロセスでヒープ領域31内にメモリを確保する場合にも本発明を適用できる。   For example, in the above-described embodiment, the case where the memory is secured in the heap area 31 by each of a plurality of threads as a process with high real-time characteristics has been described. The present invention can also be applied when a memory is secured in the heap area 31 by a process.

メモリ管理部のメモリ割当部による処理を示す概略フローチャートである。It is a schematic flowchart which shows the process by the memory allocation part of a memory management part. 図1中のステップS6の詳細フローチャートである。It is a detailed flowchart of step S6 in FIG. (A)〜(C)はそれぞれ図2のステップS23、S24〜S26並びにS24、S25及びS27の処理説明図である。(A)-(C) are process explanatory drawings of step S23 of FIG. 2, S24-S26, and S24, S25, and S27, respectively. (A)及び(B)は図2のステップ28及びS29の処理説明図である。(A) And (B) is processing explanatory drawing of step 28 and S29 of FIG. メモリデフラグメンテーションに関係した部分の機能ブロック図である。It is a functional block diagram of the part related to memory defragmentation. 本発明が適用される組込システムの概略ブロック図である。1 is a schematic block diagram of an embedded system to which the present invention is applied.

10 ワンチップマイクロコンピュータ
11 MPU
12 バス
13 ROM
14 RAM
15 周辺回路
16 I/Oインタフェース
20 メインスレッド
21〜23 スレッド
30 メモリ管理部
301 メモリ割当部
302 メモリ解放部
303 メモリデフラグメンテーション部
31 ヒープ領域
32 メモリ管理リスト
321 未使用リスト
322 使用中リスト
A〜G 使用中領域
SZum 最大サイズ
SZ1、SZ2 サイズ
F フラグ
10 One-chip microcomputer 11 MPU
12 bus 13 ROM
14 RAM
DESCRIPTION OF SYMBOLS 15 Peripheral circuit 16 I / O interface 20 Main thread 21-23 Thread 30 Memory management part 301 Memory allocation part 302 Memory release part 303 Memory defragmentation part 31 Heap area 32 Memory management list 321 Unused list 322 Used list A to G In-use area SZum maximum size SZ1, SZ2 size F flag

Claims (6)

物理メモリ上のヒープ領域を管理するメモリ管理装置において、
該ヒープ領域における複数の使用中領域のうち最大サイズのものの両端のそれぞれから該ヒープ領域の同一側端までの2領域中サイズが小さい方の領域内に、該最大サイズの使用中領域以外の使用中領域の全部又は一部を、所定順に再配置してデフラグメンテーションを行う管理手段、
を有することを特徴とするメモリ管理装置。
In the memory management device that manages the heap area on the physical memory,
Among the plurality of used areas in the heap area, the areas other than the used area of the maximum size are used in the area having the smaller size in the two areas from both ends of the one having the maximum size to the same side edge of the heap area. Management means for rearranging all or part of the middle region in a predetermined order and performing defragmentation,
A memory management device comprising:
該管理手段は、第1段階として、該2領域中サイズが小さい方の領域内に存在する使用中領域を先に、該最大サイズの使用中領域にアドレス上近い方から順に再配置する、
ことを特徴とする請求項1に記載のメモリ管理装置。
The management means, as a first step, rearranges the in-use area existing in the area with the smaller size in the two areas first, in order from the address closest to the in-use area of the maximum size,
The memory management device according to claim 1.
該管理手段はさらに、該第1段階の再配置完了後に第2段階として、該2領域中サイズが大きい方の領域内の使用中領域を所定順に、該2領域中サイズが小さい方の領域内の未使用中領域に再配置し、再配置できないものは、該2領域中サイズが大きい方の領域内に、該最大サイズの使用中領域にアドレス上近い方から順に再配置する、
ことを特徴とする請求項2に記載のメモリ管理装置。
The management means further includes, as a second stage after completion of the rearrangement of the first stage, in-use areas in the area having the larger size in the two areas in a predetermined order, in the area having the smaller size in the two areas. Those that cannot be rearranged in the unused area are rearranged in order from the address closest to the used area of the maximum size in the area with the larger size in the two areas.
The memory management device according to claim 2.
該管理手段はさらに、該第2段階の再配置完了後に、該2領域中サイズが小さい方の領域内の未使用中領域のサイズが、該最大サイズの使用中領域のそれ以上であれば、該最大サイズの使用中領域をこの未使用中領域内に再配置する、
ことを特徴とする請求項3に記載のメモリ管理装置。
If the size of the unused area in the area with the smaller size in the two areas is larger than that of the used area of the maximum size after the rearrangement in the second stage is completed, Relocating the maximum size in use area into this unused area;
The memory management device according to claim 3.
請求項1乃至4のいずれか1つに記載のメモリ管理装置を備えたことを特徴とするワンチップマイクロコンピュータ。   A one-chip microcomputer comprising the memory management device according to claim 1. 請求項5に記載のワンチップマイクロコンピュータと、
該ワンチップマイクロコンピュータにより制御される制御対象と、
を備えたことを特徴とする組込システム。
A one-chip microcomputer according to claim 5;
A controlled object controlled by the one-chip microcomputer;
An embedded system characterized by comprising:
JP2009128112A 2009-05-27 2009-05-27 Memory management device and one-chip microcomputer equipped with the same and integrated system Pending JP2010277268A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009128112A JP2010277268A (en) 2009-05-27 2009-05-27 Memory management device and one-chip microcomputer equipped with the same and integrated system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009128112A JP2010277268A (en) 2009-05-27 2009-05-27 Memory management device and one-chip microcomputer equipped with the same and integrated system

Publications (1)

Publication Number Publication Date
JP2010277268A true JP2010277268A (en) 2010-12-09

Family

ID=43424188

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009128112A Pending JP2010277268A (en) 2009-05-27 2009-05-27 Memory management device and one-chip microcomputer equipped with the same and integrated system

Country Status (1)

Country Link
JP (1) JP2010277268A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112011104358T5 (en) 2010-12-13 2013-10-17 Yazaki Corporation Electric wire connection structure for a plug connection and method for producing the same
WO2018127948A1 (en) * 2017-01-04 2018-07-12 株式会社日立製作所 Computer system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112011104358T5 (en) 2010-12-13 2013-10-17 Yazaki Corporation Electric wire connection structure for a plug connection and method for producing the same
DE112011104358B4 (en) 2010-12-13 2023-03-16 Yazaki Corporation Electrical wire connection structure for a connector terminal and method of making the same
WO2018127948A1 (en) * 2017-01-04 2018-07-12 株式会社日立製作所 Computer system

Similar Documents

Publication Publication Date Title
CN102662718B (en) Module for starting multiple user programs by single FLASH
JP2010250512A5 (en)
US20130036426A1 (en) Information processing device and task switching method
JP2011164971A (en) Method for strengthening communication path between bios and bmc, device thereof and program thereof
CN102323899B (en) Fault tolerance-oriented operating system memory management method under NUMA architecture
CA2547078A1 (en) Memory management in a computer system using different swapping criteria
CN107851065B (en) Pre-cache allocator
JP2010277268A (en) Memory management device and one-chip microcomputer equipped with the same and integrated system
JP2009020555A (en) Swapping device
KR102116984B1 (en) Method for controlling memory swap operation and data processing system adopting the same
WO2014063329A1 (en) Flash sharing method, controller and system
CN112162818A (en) Virtual memory allocation method and device, electronic equipment and storage medium
JP2006099702A (en) Information processor and data transfer control method
JP2008262451A (en) Memory power supply management device and memory power supply management method
JP2006107197A (en) Memory control method and program and terminal equipment
JP4868012B2 (en) Computer system, computer system control method, and program
JP2009258984A (en) Information processor and load control method
JP5334048B2 (en) Memory device and computer
JP2017201481A (en) Information processing apparatus, method for controlling information processing apparatus, and program for controlling information processing apparatus
JP3726701B2 (en) Kernel space demand paging swap-out method and method
JP2009251681A (en) Expansion method for stack region and program
JP2007265230A (en) Information processor and method for reading file thereof
JP5561294B2 (en) Microcomputer
WO2009144383A1 (en) Memory management method and apparatus
JP2010237770A (en) Information processing apparatus, bridge device, and information processing method