[go: up one dir, main page]

JP2017162364A - Allocation device - Google Patents

Allocation device Download PDF

Info

Publication number
JP2017162364A
JP2017162364A JP2016048335A JP2016048335A JP2017162364A JP 2017162364 A JP2017162364 A JP 2017162364A JP 2016048335 A JP2016048335 A JP 2016048335A JP 2016048335 A JP2016048335 A JP 2016048335A JP 2017162364 A JP2017162364 A JP 2017162364A
Authority
JP
Japan
Prior art keywords
memory area
memory
allocated
continuous
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
JP2016048335A
Other languages
Japanese (ja)
Inventor
大輔 平林
Daisuke Hirabayashi
大輔 平林
松尾 剛
Takeshi Matsuo
剛 松尾
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.)
Pioneer Corp
Original Assignee
Pioneer Electronic 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 Pioneer Electronic Corp filed Critical Pioneer Electronic Corp
Priority to JP2016048335A priority Critical patent/JP2017162364A/en
Publication of JP2017162364A publication Critical patent/JP2017162364A/en
Pending legal-status Critical Current

Links

Images

Abstract

PURPOSE: To provide an allocation device capable of suppressing increase of processing load and preventing segmentation of a free space, in allocation of a continuous memory region.CONSTITUTION: A continuous memory region, where a plurality of unit memory regions in a physical memory is juxtaposed sequentially and continuously, is allocated for a plurality of types of processing. For one type of processing among the plurality of types of processing, a first allocation memory region is allocated from one end part of the continuous memory region, and during execution of the one processing, for the other types of processing, a second allocation memory region is allocated from the other end part of the continuous memory region.SELECTED DRAWING: Figure 1

Description

本発明は、複数の処理に対してメモリ領域を割り当てる割り当て装置に関する。   The present invention relates to an allocation device that allocates a memory area to a plurality of processes.

動画再生等の高い処理性能が要求される処理を実行する際に、OS(Operation System)への負荷を軽減して処理の高速化を図るため、専用のハードウェアを用いて処理を行うことが知られている。ハードウェアからはOSの仮想メモリの仕組みを利用することができないため、かかる処理を行う際には、当該処理のための連続メモリ領域を物理メモリ内に確保する必要がある。   When executing processing that requires high processing performance, such as video playback, processing can be performed using dedicated hardware in order to reduce the load on the OS (Operation System) and increase the processing speed. Are known. Since the mechanism of the virtual memory of the OS cannot be used from hardware, it is necessary to secure a continuous memory area for the processing in the physical memory when performing such processing.

組込みシステムを用いた製品では、メモリ容量が潤沢ではない場合が多い。それゆえ、連続メモリ領域を確保するためには、システムの起動時に、OSが管理するメモリ領域とは別の専用のメモリ領域を用意しておく必要がある。例えば動画再生の場合、製品の仕様上必要となる最大の動画素材のサイズのメモリ領域を確保することになる。   In products using embedded systems, the memory capacity is often not sufficient. Therefore, in order to secure a continuous memory area, it is necessary to prepare a dedicated memory area different from the memory area managed by the OS when the system is started. For example, in the case of moving image reproduction, a memory area having the size of the maximum moving image material necessary for product specifications is secured.

このような専用のメモリ領域を用いて、複数の処理を同時に行うことが必要となる場合がある。例えば2つの画面で夫々別の動画を再生する場合、用意しておいた専用のメモリ領域の先頭(例えば、最小アドレス)から順に必要サイズ分のメモリ領域を割り当てる。その際、複数種類の動画を連続して再生するような場合、再生する動画の順番によってはフラグメンテーションが生じてしまい、連続した空き領域を十分に確保することができない。フラグメンテーションを考慮して予め大きいサイズの専用のメモリ領域を用意しておくことも考えられるが、その場合、OSで使用できるメモリ領域が小さくなってしまう。   It may be necessary to perform a plurality of processes simultaneously using such a dedicated memory area. For example, when playing different moving images on two screens, memory areas corresponding to the required size are allocated in order from the top (for example, the minimum address) of the prepared dedicated memory area. At that time, when a plurality of types of moving images are continuously played back, fragmentation occurs depending on the order of the moving images to be played back, and a continuous free space cannot be secured sufficiently. Considering fragmentation, it may be possible to prepare a dedicated memory area of a large size in advance, but in this case, the memory area that can be used by the OS becomes small.

フラグメンテーションの発生を抑える方法として、番組情報をハードディスクに録画する情報録画再生装置において、記録領域に空き領域が生じた場合に、空き領域に続く領域に記録されている番組情報を空き領域に移動させ、番組情報の録画・削除が繰り返されても空き領域が細分化しないようにする技術が提案されている(例えば、特許文献1)。   As a method of suppressing the occurrence of fragmentation, in an information recording / reproducing apparatus for recording program information on a hard disk, when an empty area occurs in the recording area, the program information recorded in the area following the empty area is moved to the empty area. A technique has been proposed in which empty areas are not subdivided even when recording / deletion of program information is repeated (for example, Patent Document 1).

特開2005−354436号公報JP 2005-354436 A

上記した従来技術では、記録されている情報を空き領域へ移動させる処理を行う分、処理に負荷がかかるという問題が生じる。また、ハードディスクに空き領域が生じた場合に記録済みの領域を移動させるのとは異なり、動画再生等の実行中の処理に割り当てられている連続メモリ領域を移動させるためには、処理をいったん中断しなければならない。   In the above-described conventional technology, there is a problem that processing is burdened by the amount of processing for moving recorded information to an empty area. Unlike moving the recorded area when free space occurs on the hard disk, the process is temporarily suspended to move the continuous memory area allocated to the process currently being executed, such as movie playback. Must.

本発明が解決しようとする課題としては、上記した従来技術において生じる、処理にかかる負荷の増大を抑えつつ、空き領域の細分化を防ぐという問題が一例として挙げられる。   The problem to be solved by the present invention is, for example, the problem of preventing subdivision of free areas while suppressing an increase in processing load that occurs in the above-described conventional technology.

請求項1に記載の発明は、物理メモリ内の複数の単位メモリ領域が順に連続して並置された連続メモリ領域を複数の処理に対して割り当てる割り当て装置であって、前記複数の処理のうち1の処理に対して第1の割当メモリ領域を前記連続メモリ領域の一方の端部から割り当て、前記1の処理の実行中に他の処理に対して第2の割当メモリ領域を前記連続メモリ領域の他方の端部から割り当てる割り当て部を備えることを特徴とする。   The invention according to claim 1 is an allocating device that allocates, to a plurality of processes, a continuous memory area in which a plurality of unit memory areas in a physical memory are sequentially juxtaposed, and one of the plurality of processes The first allocated memory area is allocated from one end of the continuous memory area for the process of (2), and the second allocated memory area is allocated to the other process during execution of the first process. An allocating unit that is allocated from the other end is provided.

また、請求項5に記載の発明は、物理メモリ内の複数の単位メモリ領域が順に連続して並置された連続メモリ領域を複数の処理に対して割り当てる割り当て装置におけるメモリ領域の割り当て方法であって、割り当て手段に、前記複数の処理のうち1の処理に対して第1の割当メモリ領域を前記連続メモリ領域の一方の端部から割り当てさせるステップと、前記割り当て手段に、前記1の処理の実行中に他の処理に対して第2の割当メモリ領域を前記連続メモリ領域の他方の端部から割り当てさせるステップと、を含むことを特徴とする。   The invention according to claim 5 is a memory area allocating method in an allocating apparatus that allocates a continuous memory area in which a plurality of unit memory areas in a physical memory are sequentially arranged in parallel to a plurality of processes. , Causing the assigning means to assign a first assigned memory area to one of the plurality of processes from one end of the continuous memory area; and causing the assigning means to execute the first process. And allocating the second allocated memory area to the other process from the other end of the continuous memory area.

また、請求項8に記載の発明は、物理メモリ内の複数の単位メモリ領域が順に連続して並置された連続メモリ領域を複数の処理に対して割り当てるプログラムであって、コンピュータに、前記複数の処理のうち1の処理に対して第1の割当メモリ領域を前記連続メモリ領域の一方の端部から割り当てるステップと、前記1の処理の実行中に他の処理に対して第2の割当メモリ領域を前記連続メモリ領域の他方の端部から割り当てるステップと、を実行させることを特徴とする。   The invention according to claim 8 is a program for allocating a continuous memory area in which a plurality of unit memory areas in a physical memory are sequentially arranged in parallel to a plurality of processes, and A step of allocating a first allocated memory area from one end of the continuous memory area to one of the processes, and a second allocated memory area to another process during execution of the first process Allocating from the other end of the continuous memory area.

また、請求項9に記載の発明は、物理メモリ内の複数の単位メモリ領域が順に連続して並置された連続メモリ領域を複数の処理に対して割り当てるプログラムを記録する記録媒体であって、前記プログラムは、コンピュータに、前記複数の処理のうち1の処理に対して第1の割当メモリ領域を前記連続メモリ領域の一方の端部から割り当てるステップと、前記1の処理の実行中に他の処理に対して第2の割当メモリ領域を前記連続メモリ領域の他方の端部から割り当てるステップと、を実行させることを特徴とする。   The invention according to claim 9 is a recording medium for recording a program for allocating a continuous memory area in which a plurality of unit memory areas in a physical memory are sequentially juxtaposed to a plurality of processes. The program allocates a first allocated memory area to one of the plurality of processes from one end of the continuous memory area to the computer, and another process during the execution of the first process. Allocating the second allocated memory area from the other end of the continuous memory area.

動画再生システムの構成を示すブロック図である。It is a block diagram which shows the structure of a moving image reproduction system. 連続メモリ領域管理モジュール22の構成を示す図である。3 is a diagram showing a configuration of a continuous memory area management module 22. FIG. メモリ12及び連続メモリ領域CMを模式的に示す図である。It is a figure which shows typically the memory 12 and the continuous memory area | region CM. 連続メモリ領域CMへの第1及び第2の割当メモリ領域の割り当てを模式的に示す図である。It is a figure which shows typically allocation of the 1st and 2nd allocation memory area to the continuous memory area CM. メモリ領域の割り当てを仮に先頭位置から順に行った場合の例を模式的に示す図である。It is a figure which shows typically the example at the time of assigning a memory area in order from the head position.

以下、本発明の実施例を図面を参照しつつ詳細に説明する。以下の実施例においては、2つのディスプレイにおいて別個に並行して動画再生を行う動画再生システムに本発明の割り当て装置を適用した場合について説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the following embodiment, a case will be described in which the assigning device of the present invention is applied to a moving image reproduction system that reproduces moving images separately and in parallel on two displays.

動画再生システム10は、制御部11、メモリ12、ハードウェアデコーダ13、第1ディスプレイ14及び第2ディスプレイ15から構成される。   The moving image reproduction system 10 includes a control unit 11, a memory 12, a hardware decoder 13, a first display 14 and a second display 15.

動画再生システム10は、外部から動画データVDの供給を受け、第1ディスプレイ14又は第2ディスプレイ15において動画を再生する処理を行う。動画データVDは、例えばUSBメモリに記憶されている動画データ、地上デジタル放送を受信して得た動画データ、ミラーリンク機能によりスマートフォン等の通信端末から得た動画データを含み、夫々に対応した所定の形式に圧縮(エンコード)されている。   The moving image reproduction system 10 receives a supply of moving image data VD from the outside, and performs a process of reproducing a moving image on the first display 14 or the second display 15. The moving image data VD includes, for example, moving image data stored in a USB memory, moving image data obtained by receiving digital terrestrial broadcasting, and moving image data obtained from a communication terminal such as a smartphone by a mirror link function, and corresponding to each It is compressed (encoded) in the format.

動画再生システム10は、複数の種類の動画再生処理を第1ディスプレイ14及び第2ディスプレイ15を用いて並行して行うことが可能に構成されている。例えば、USBメモリから読みだした動画データに基づく動画再生(以下、USB動画再生と称する)、地上デジタル放送を受信して得た動画データに基づく動画再生(以下、地デジ再生と称する)、及びミラーリンクにより得た動画データに基づく動画再生(以下、ミラーリンク再生と称する)のうちの1つを第1ディスプレイ14で行いつつ、他の1つを第2ディスプレイ15で並行して行うことが可能である。なお、これらの動画再生処理は、ハードウェアデコーダ13によって行われるハードウェア処理である。   The moving image reproduction system 10 is configured to be able to perform a plurality of types of moving image reproduction processes in parallel using the first display 14 and the second display 15. For example, video playback based on video data read from a USB memory (hereinafter referred to as USB video playback), video playback based on video data obtained by receiving a terrestrial digital broadcast (hereinafter referred to as terrestrial digital playback), and One of the moving image reproductions based on the moving image data obtained by the mirror link (hereinafter referred to as mirror link reproduction) is performed on the first display 14 while the other one is performed on the second display 15 in parallel. Is possible. Note that these moving image playback processes are hardware processes performed by the hardware decoder 13.

制御部11は例えばCPU(Central Processing Unit)によって構成され、動画再生アプリケーションモジュール21及び連続メモリ領域管理モジュール22を含む。動画再生アプリケーションモジュール21及び連続メモリ領域管理モジュール22は、図示しないアプリケーションプログラムの実行に応じてオペレーションシステムが動作することにより形成される。   The control unit 11 is configured by, for example, a CPU (Central Processing Unit) and includes a moving image reproduction application module 21 and a continuous memory area management module 22. The moving image playback application module 21 and the continuous memory area management module 22 are formed by the operation system operating in response to execution of an application program (not shown).

動画再生アプリケーションモジュール21は、動画データVDのデコードを行うよう要求するデコード要求DRを、ラインL1を介してハードウェアデコーダ13に供給する。また、動画再生アプリケーションモジュール21は、メモリ12内の連続メモリ領域CMに動画再生処理のデータの展開先として割り当てるメモリ領域(以下、割当メモリ領域と称する)を確保するよう要求するメモリ確保要求を、連続メモリ領域管理モジュール22に供給する。   The moving image reproduction application module 21 supplies a decode request DR requesting to decode the moving image data VD to the hardware decoder 13 via the line L1. In addition, the video playback application module 21 issues a memory allocation request for requesting to allocate a memory area (hereinafter referred to as an allocated memory area) to be allocated as a development destination of data for video playback processing in the continuous memory area CM in the memory 12. This is supplied to the continuous memory area management module 22.

連続メモリ領域管理モジュール22は、本発明の割り当て装置の一例に相当する。連続メモリ領域管理モジュール22は、図2に示すように、割り当て部31と、取得部32と、判定部33と、を含む。   The continuous memory area management module 22 corresponds to an example of an allocation apparatus according to the present invention. As illustrated in FIG. 2, the continuous memory area management module 22 includes an allocation unit 31, an acquisition unit 32, and a determination unit 33.

割り当て部31は、連続メモリ領域管理モジュール22は、動画再生システム10の立ち上げに応じて、ラインL2により制御部11と双方向に接続されたメモリ12内に動画再生処理のための連続メモリ領域CMを確保する処理を行う。連続メモリ領域CMは、図3に示すように、複数の単位メモリ領域UMが順に連続して並置されたメモリ領域から構成される。   The allocation unit 31 is configured so that the continuous memory area management module 22 has a continuous memory area for moving image reproduction processing in the memory 12 that is bidirectionally connected to the control unit 11 via the line L2 in response to the start of the moving image reproduction system 10. A process for securing the CM is performed. As shown in FIG. 3, the continuous memory area CM includes a memory area in which a plurality of unit memory areas UM are sequentially arranged side by side.

また、割り当て部31は、動画再生アプリケーションモジュール21からのメモリ確保要求に応じて、ハードウェアデコーダ13によってデコードされた動画データVDの展開先となるメモリ領域を、連続メモリ領域CM内において割り当てるメモリ割り当て処理を行う。その際、割り当て部31は、連続メモリ領域CM内において、複数の処理(動画再生処理)のうち1の処理に対して第1の割当メモリ領域を連続メモリ領域CMの一方の端部から割り当て、当該1の処理の実行中に他の処理に対して第2の割当メモリ領域を連続メモリ領域CMの他方の端部から割り当てる。   Further, the allocation unit 31 allocates a memory area to which the video data VD decoded by the hardware decoder 13 is expanded in the continuous memory area CM in response to a memory allocation request from the video playback application module 21. Process. At that time, the allocating unit 31 allocates a first allocated memory area from one end of the continuous memory area CM to one of a plurality of processes (moving image reproduction processes) in the continuous memory area CM. During execution of the first process, the second allocated memory area is allocated to the other processes from the other end of the continuous memory area CM.

連続メモリ領域CMは、単位メモリ領域が順に(例えば、アドレス順に)連続して並置されたメモリ領域である。従って、連続メモリ領域CMの一方の端部及び他方の端部とは、例えば連続メモリ領域CM内の最小のアドレス及び最大のアドレスを指す。USB動画再生、地デジ再生、及びミラーリンク再生のうちの1つを第1ディスプレイ14で再生中に、他の種類の動画再生を第2ディスプレイ15で行う場合、割り当て部31は、連続メモリ領域CM内の最小のアドレスから第1の割当メモリ領域を割り当て、連続メモリ領域CM内の最大のアドレスから第2の割当メモリ領域を割り当てる。   The continuous memory area CM is a memory area in which unit memory areas are successively arranged in order (for example, in the order of addresses). Accordingly, one end and the other end of the continuous memory area CM indicate, for example, the minimum address and the maximum address in the continuous memory area CM. When one of USB video playback, terrestrial digital playback, and mirror link playback is being played on the first display 14 and another type of video playback is to be performed on the second display 15, the allocating unit 31 has a continuous memory area. The first allocated memory area is allocated from the smallest address in the CM, and the second allocated memory area is allocated from the largest address in the continuous memory area CM.

取得部32は、複数種類の動画再生処理の各々において必要なメモリ領域のメモリ量を示すメモリ情報を取得する処理を行う。動画再生処理の各々において必要なメモリ領域(以下、必要メモリ領域)とは、当該動画再生処理において使用が想定される最大サイズのメモリ領域である。例えば、USB動画再生における必要メモリ領域は40MB、地デジ再生における必要メモリ領域は32MB、ミラーリンク再生における必要メモリ領域は16MBとなる。   The acquisition unit 32 performs a process of acquiring memory information indicating a memory amount of a memory area necessary for each of the plurality of types of moving image reproduction processes. The memory area necessary for each of the moving image reproduction processes (hereinafter referred to as “necessary memory area”) is a memory area of the maximum size assumed to be used in the moving image reproduction process. For example, the required memory area for USB video playback is 40 MB, the required memory area for terrestrial digital playback is 32 MB, and the required memory area for mirror link playback is 16 MB.

割り当て部31は、取得部32が取得した必要メモリ領域の情報に基づいて、メモリ12内に連続メモリ領域CMを設定する。具体的には、割り当て部31は、最も大きい必要メモリ領域の大きさと2番目に大きい必要メモリ領域の大きさとの和の大きさを有する連続したメモリ領域を、連続メモリ領域CMとして確保する。例えば、USB動画再生(40MB)、地デジ再生(32MB)、ミラーリンク再生(16MB)のいずれか2つを割り当てるために確保される連続メモリ領域CMの大きさは、40MB+32MB=72MBとなる。   The allocating unit 31 sets the continuous memory area CM in the memory 12 based on the necessary memory area information acquired by the acquiring unit 32. Specifically, the allocation unit 31 secures a continuous memory area having the sum of the size of the largest necessary memory area and the size of the second largest necessary memory area as the continuous memory area CM. For example, the size of the continuous memory area CM allocated to allocate any two of USB moving image playback (40 MB), terrestrial digital playback (32 MB), and mirror link playback (16 MB) is 40 MB + 32 MB = 72 MB.

判定部33は、実行中の処理に割り当てられている割当メモリ領域が、連続メモリ領域CMの一方の端部(最小アドレス)又は他方の端部(最大アドレス)のいずれから割り当てられているかを判定する判定処理を行う。割り当て部31は、判定部33の判定結果に基づいて、メモリ割り当て処理を行う。すなわち、割り当て部31は、連続メモリ領域CMの一方の端部又は他方の端部のうち、実行中の処理が割り当てられていない方の端部から次に実行する処理の割当メモリ領域を割り当てる。   The determination unit 33 determines whether the allocated memory area allocated to the process being executed is allocated from one end (minimum address) or the other end (maximum address) of the continuous memory area CM. A determination process is performed. The allocation unit 31 performs a memory allocation process based on the determination result of the determination unit 33. That is, the allocating unit 31 allocates an allocated memory area for a process to be executed next from one end or the other end of the continuous memory area CM to which the process being executed is not allocated.

メモリ12は、例えばRAM(Random Access Memory)等の物理メモリ(実メモリとも称する)であり、ハードウェアデコーダ13による動画再生処理や、制御部11の制御に基づくその他の処理においてデータの展開先となるメモリ領域を有する。メモリ12は、ラインL2を介して制御部11と双方向に接続され、ラインL3を介してハードウェアデコーダ13と双方向に接続されている。   The memory 12 is a physical memory (also referred to as a real memory) such as a RAM (Random Access Memory), for example. In the moving image reproduction process by the hardware decoder 13 and other processes based on the control of the control unit 11, A memory area. The memory 12 is bidirectionally connected to the control unit 11 via the line L2, and bidirectionally connected to the hardware decoder 13 via the line L3.

メモリ12内には、図3に示すように、複数の単位メモリ領域UMが順に連続して並置されたメモリ領域が連続メモリ領域CMとして確保される。そして、連続メモリ領域CMには、連続メモリ領域管理モジュール22の割り当て部31によって割当メモリ領域(第1の割当メモリ領域及び第2の割当メモリ領域)が割り当てられ、ハードウェアデコーダ13によりデコードされた動画データVDが展開される。   In the memory 12, as shown in FIG. 3, a memory area in which a plurality of unit memory areas UM are successively arranged side by side is secured as a continuous memory area CM. Then, an allocation memory area (first allocation memory area and second allocation memory area) is allocated to the continuous memory area CM by the allocation unit 31 of the continuous memory area management module 22 and decoded by the hardware decoder 13. The moving image data VD is developed.

ハードウェアデコーダ13は、制御部11からのデコード要求DRに応じて動画データVDをデコードし、デコード結果である復号データDDを連続メモリ領域CM内の割当メモリ領域に展開する。USB動画再生、地デジ再生、及びミラーリンク再生のうちの2つを同時に行う場合、ハードウェアデコーダ13は、第1の動画データVD1をデコードした復号データDD1及び第2の動画データVD2をデコードした復号データDD2を、夫々第1の割当メモリ領域及び第2の割当メモリ領域に展開する。   The hardware decoder 13 decodes the moving image data VD in response to the decoding request DR from the control unit 11, and expands the decoded data DD, which is a decoding result, into the allocated memory area in the continuous memory area CM. When performing two of USB video playback, terrestrial digital playback, and mirror link playback at the same time, the hardware decoder 13 decodes decoded data DD1 and second video data VD2 obtained by decoding the first video data VD1. The decoded data DD2 is expanded in the first allocation memory area and the second allocation memory area, respectively.

第1ディスプレイ14及び第2ディスプレイ15は、ハードウェアデコーダ13によってデコードされ、メモリ12内の連続メモリ領域CMに展開された復号データDDに基づいて動画を再生(表示)する。第1ディスプレイ14及び第2ディスプレイ15は、例えば車載用ディスプレイとして、夫々自動車等の移動体のフロント部及びリア部に設けられている。   The first display 14 and the second display 15 reproduce (display) moving images based on the decoded data DD decoded by the hardware decoder 13 and expanded in the continuous memory area CM in the memory 12. The 1st display 14 and the 2nd display 15 are each provided in the front part and rear part of moving bodies, such as a car, for example as an in-vehicle display.

次に、連続メモリ領域管理モジュール22の割り当て部31が行うメモリ割り当て処理について、図4を参照して説明する。ここでは、例えば連続メモリ領域確保処理において72MBの連続メモリ領域CMが確保されている場合を例として説明する。   Next, a memory allocation process performed by the allocation unit 31 of the continuous memory area management module 22 will be described with reference to FIG. Here, for example, a case where a 72 MB continuous memory area CM is secured in the continuous memory area securing process will be described as an example.

図4(a)は、単位メモリ領域UMを8MBとして9個の単位メモリ領域UMが連続して並置されて構成されている72MBの連続メモリ領域CM(すなわち8×9=72MB)を模式的に示した図である。図中、「Min」は連続メモリ領域CM中の最小アドレスの位置を示し、「Max」は最大アドレスの位置を示している。すなわち、模式的に示す連続メモリ領域CMの一方の端部及び他方の端部が最小アドレス及び最大アドレスに対応している。   FIG. 4A schematically shows a 72 MB continuous memory area CM (that is, 8 × 9 = 72 MB) configured by continuously arranging nine unit memory areas UM with the unit memory area UM being 8 MB. FIG. In the figure, “Min” indicates the position of the minimum address in the continuous memory area CM, and “Max” indicates the position of the maximum address. That is, one end portion and the other end portion of the continuous memory area CM schematically shown correspond to the minimum address and the maximum address.

第1ディスプレイ14及び第2ディスプレイ15のいずれにおいても動画再生処理を実行していない状態において、いずれか一方のディスプレイで最初の動画再生(以下、第1処理と称する)を開始する場合、連続メモリ領域管理モジュール22の割り当て部31は、連続メモリ領域CM中の最小アドレスから、第1処理のための割当メモリ領域を割り当てる。例えば、第1処理が第1ディスプレイ14でのミラーリンク再生である場合、第1処理の割当メモリ領域P−Aの大きさはミラーリンク再生の必要メモリ領域である16MBとなる。従って、割り当て部31は、図4(b)に示すように、連続メモリ領域CMの一方の端部(すなわち、最小アドレス)から16MB分の領域を、第1処理の割当メモリ領域P−Aとして割り当てる。   In a state where neither the first display 14 nor the second display 15 is executing the moving image reproduction process, when starting the first moving image reproduction (hereinafter referred to as the first process) on one of the displays, the continuous memory The allocation unit 31 of the area management module 22 allocates an allocated memory area for the first process from the minimum address in the continuous memory area CM. For example, when the first process is mirror link reproduction on the first display 14, the size of the allocated memory area PA of the first process is 16 MB, which is a necessary memory area for mirror link reproduction. Accordingly, as shown in FIG. 4B, the allocation unit 31 sets an area of 16 MB from one end (that is, the minimum address) of the continuous memory area CM as the allocation memory area PA of the first process. assign.

次に、第1ディスプレイ14での動画再生(第1処理)を実行中に、第2ディスプレイ15で次の動画再生(以下、第2処理と称する)を開始する場合、連続メモリ領域管理モジュール22の割り当て部31は、連続メモリ領域CM中の最大アドレスから、第2処理のための割当メモリ領域を割り当てる。例えば、第2処理が第2ディスプレイ15での地デジ再生である場合、第2処理の割当メモリ領域P−Bの大きさは地デジ再生の必要メモリ領域である32MBとなる。従って、割り当て部31は、図4(c)に示すように、連続メモリ領域CMの他方の端部(最大アドレス)から32MB分の領域を、第2処理の割当メモリ領域P−Bとして割り当てる。   Next, when the next video playback (hereinafter referred to as second processing) is started on the second display 15 while the video playback (first processing) is being performed on the first display 14, the continuous memory area management module 22. The allocation unit 31 allocates an allocated memory area for the second process from the maximum address in the continuous memory area CM. For example, when the second process is terrestrial digital reproduction on the second display 15, the size of the allocated memory area P-B of the second process is 32 MB, which is a necessary memory area for terrestrial digital reproduction. Therefore, as shown in FIG. 4C, the allocation unit 31 allocates an area of 32 MB from the other end (maximum address) of the continuous memory area CM as an allocation memory area P-B for the second process.

その後、第1処理を終了すると、図4(d)に示すように、第1処理の割当メモリ領域P−Aがクリアされ、連続メモリ領域CMの一方の端部を含む領域が空き領域となる。   Thereafter, when the first process is finished, as shown in FIG. 4D, the allocated memory area PA of the first process is cleared, and an area including one end of the continuous memory area CM becomes a free area. .

次に、第2ディスプレイ15での動画再生(第2処理)を実行中に、第1ディスプレイ14で次の動画再生(以下、第3処理と称する)を開始する場合、連続メモリ領域管理モジュール22の割り当て部31は、連続メモリ領域CM中の最小アドレスから、第3処理のための割当メモリ領域を割り当てる。例えば、第3処理が第1ディスプレイ14でのUSB動画再生である場合、第3処理の割当メモリ領域P−Cの大きさはUSB動画再生の必要メモリ領域である40MBとなる。従って、連続メモリ領域管理モジュール22は、図4(e)に示すように、連続メモリ領域CMの一方の端部(最小アドレス)から40MB分の領域を、第3処理の割当メモリ領域P−Cとして割り当てる。   Next, when the next video playback (hereinafter referred to as the third processing) is started on the first display 14 while the video playback (second processing) is being performed on the second display 15, the continuous memory area management module 22 is started. The allocation unit 31 allocates an allocated memory area for the third process from the minimum address in the continuous memory area CM. For example, when the third process is USB moving image reproduction on the first display 14, the size of the allocated memory area PC in the third process is 40 MB, which is a necessary memory area for USB moving image reproduction. Therefore, as shown in FIG. 4E, the continuous memory area management module 22 assigns an area for 40 MB from one end (minimum address) of the continuous memory area CM to the allocated memory area PC in the third process. Assign as.

このように、第1ディスプレイ14及び第2ディスプレイで並行して動画再生を行う場合、連続メモリ領域管理モジュール22の割り当て部31は、一方の動画再生処理のためのメモリ領域を連続メモリ領域CMの一方の端部から割り当て、他方の動画再生処理のためのメモリ領域を連続メモリ領域CMの他方の端部から割り当てる。従って、第1ディスプレイ14及び第2ディスプレイ15において、必要メモリ領域の異なる複数の種類の動画再生(複数の種類のソースの動画再生)を繰り返し行った場合でも、フラグメンテーションが発生しない。   As described above, when the moving image reproduction is performed in parallel on the first display 14 and the second display, the allocating unit 31 of the continuous memory area management module 22 assigns the memory area for one moving image reproduction process to the continuous memory area CM. Allocating from one end, the other memory area for moving image reproduction processing is allocated from the other end of the continuous memory area CM. Therefore, even when the first display 14 and the second display 15 repeatedly perform a plurality of types of moving image reproduction (moving image reproduction of a plurality of types of sources) having different necessary memory areas, fragmentation does not occur.

これとは異なり、例えば図5に示すように、連続メモリ領域CM(図5(a))において、第1処理の割当メモリ領域P−A(例えば、16MB)を一方の端部(最小アドレス)から割り当て(図5(b))、続く領域に第2処理の割当メモリ領域P−B(例えば、32MB)を割り当てた場合(図5(c))、その後に第1処理を終了すると、連続メモリ領域CMの両端に空き領域が発生する(図5(d))。従って、その後に第1処理よりも必要メモリ領域が大きい第3処理(例えば、40MB)を行う場合、連続した十分なメモリ領域を確保することができず、フラグメンテーションが発生してしまう。   Unlike this, for example, as shown in FIG. 5, in the continuous memory area CM (FIG. 5A), the allocated memory area PA of the first process (for example, 16 MB) is set to one end (minimum address). (FIG. 5 (b)), when the allocated memory area P-B (for example, 32 MB) of the second process is allocated to the subsequent area (FIG. 5 (c)), the first process is terminated after that. Empty areas occur at both ends of the memory area CM (FIG. 5D). Therefore, when a third process (for example, 40 MB) having a larger memory area than the first process is subsequently performed, a sufficient continuous memory area cannot be secured, and fragmentation occurs.

また、図5のように割り当てを行う場合、フラグメンテーションの発生を抑えるためには、異なる種類の動画再生が繰り返し行われた場合でも十分な空き領域が発生するように、動画再生のためのメモリ領域を予め大きく確保しておく必要がある。しかし、その場合、OSが行う動画再生処理以外の他の処理のためのメモリ領域が圧迫されてしまう。   In addition, when allocation is performed as shown in FIG. 5, in order to suppress the occurrence of fragmentation, a memory area for video playback so that a sufficient free area is generated even when different types of video playback are repeated. Must be secured in advance. However, in that case, a memory area for processing other than the moving image reproduction processing performed by the OS is compressed.

これに対し、本実施例の割り当て装置によれば、連続メモリ領域管理モジュール22の割り当て部31は、連続メモリ領域確保処理において、最も大きい必要メモリ領域の大きさと2番目に大きい必要メモリ領域の大きさとの和の大きさを有する連続したメモリ領域を連続メモリ領域CMとして確保すれば良いため、フラグメンテーションを想定した余分なメモリ領域の確保を行う必要がない。   On the other hand, according to the allocating device of this embodiment, the allocating unit 31 of the continuous memory area management module 22 uses the largest necessary memory area size and the second largest necessary memory area size in the continuous memory area securing process. Therefore, it is only necessary to secure a continuous memory area having the size of the sum as the continuous memory area CM, so that it is not necessary to secure an extra memory area assuming fragmentation.

また、本実施例の割り当て装置では、割り当て部31が連続メモリ領域CMの一方の端部(最小アドレス)から第1処理の割当メモリ領域を割り当て、他方の端部(最大アドレス)から第2処理の割当メモリ領域を割り当てることにより、フラグメンテーションの発生につながる空き領域の分散を防ぐため、いったん割当メモリ領域の割り当てを行った後にその領域を移動させるといった処理をあらためて行う必要がない。従って、移動処理に伴う負荷の増大が発生しない。すなわち、本実施例の割り当て装置によれば、連続メモリ領域の割り当てにおいて、処理にかかる負荷の増大を抑えつつ、空き領域の細分化を防ぐことができる。   Further, in the allocation device of the present embodiment, the allocation unit 31 allocates the allocated memory area of the first process from one end (minimum address) of the continuous memory area CM, and performs the second process from the other end (maximum address). By allocating the allocated memory area, it is not necessary to perform a process such as once allocating the allocated memory area and then moving the allocated area, in order to prevent the free area from being distributed, which leads to fragmentation. Therefore, an increase in load associated with the movement process does not occur. That is, according to the allocation device of the present embodiment, it is possible to prevent the free area from being subdivided while suppressing an increase in processing load in the allocation of the continuous memory area.

なお、上記実施例では、2つのディスプレイにおいて別個に動画再生を行う動画再生システムにおける連続メモリ領域管理モジュールに本発明を適用する場合を例として説明したが、本発明の適用対象はこれに限られない。本発明は、複数の処理に対して物理メモリ内の連続メモリ領域を割り当てる割り当て装置全般に適用することが可能である。すなわち、本発明は、1の処理に対して第1の割当メモリ領域を連続メモリ領域の一方の端部から割り当て、当該1の処理の実行中に他の処理に対して第2の割当メモリ領域を連続メモリ領域の他方の端部から割り当てることを特徴とするものである。   In the above-described embodiment, the case where the present invention is applied to the continuous memory area management module in the moving image reproduction system that separately reproduces moving images on the two displays has been described as an example. Absent. The present invention can be applied to all allocation devices that allocate continuous memory areas in physical memory for a plurality of processes. That is, according to the present invention, a first allocated memory area is allocated to one process from one end of the continuous memory area, and a second allocated memory area is allocated to another process during execution of the one process. Are allocated from the other end of the continuous memory area.

また、上記実施例では、割り当て部31が、USB動画再生、地デジ再生、ミラーリンク再生という3種類の動画再生処理のうちの1つに対して第1の割当メモリ領域を割り当て、他の1つに対して第2の割当メモリ領域を割り当てる例について説明した。しかし、処理の種類はこれら3種類に限られない。割り当て部31は、複数の処理のうち1の処理に対して第1の割当メモリ領域を連続メモリ領域CMの一方の端部から割り当て、当該1の処理の実行中に他の処理に対して第2の割当メモリ領域を連続メモリ領域CMの他方の端部から割り当てるものであれば良い。   In the above-described embodiment, the allocation unit 31 allocates the first allocation memory area to one of the three types of video playback processes, that is, USB video playback, terrestrial digital playback, and mirror link playback. An example in which the second allocated memory area is allocated to one of them has been described. However, the types of processing are not limited to these three types. The allocating unit 31 allocates the first allocated memory area from one end of the continuous memory area CM to one process among the plurality of processes, and performs the first allocation to other processes during the execution of the first process. It is sufficient if two allocated memory areas are allocated from the other end of the continuous memory area CM.

また、上記実施例で説明した一連の処理は、例えばROMなどの記録媒体に格納されたプログラムに従ったコンピュータ処理により行うことができる。   The series of processing described in the above embodiments can be performed by computer processing according to a program stored in a recording medium such as a ROM.

10 動画再生システム
11 制御部
12 メモリ
13 ハードウェアデコーダ
14 第1ディスプレイ
15 第2ディスプレイ
21 動画再生アプリケーションモジュール
22 連続メモリ領域管理モジュール
31 割り当て部
32 取得部
33 判定部
DESCRIPTION OF SYMBOLS 10 Movie reproduction system 11 Control part 12 Memory 13 Hardware decoder 14 1st display 15 2nd display 21 Movie reproduction application module 22 Continuous memory area management module 31 Allocation part 32 Acquisition part 33 Determination part

Claims (9)

物理メモリ内の複数の単位メモリ領域が順に連続して並置された連続メモリ領域を複数の処理に対して割り当てる割り当て装置であって、
前記複数の処理のうち1の処理に対して第1の割当メモリ領域を前記連続メモリ領域の一方の端部から割り当て、前記1の処理の実行中に他の処理に対して第2の割当メモリ領域を前記連続メモリ領域の他方の端部から割り当てる割り当て部を備えることを特徴とする割り当て装置。
An allocation device for allocating a continuous memory area in which a plurality of unit memory areas in a physical memory are sequentially juxtaposed to a plurality of processes,
A first allocated memory area is allocated to one of the plurality of processes from one end of the continuous memory area, and a second allocated memory is allocated to another process during execution of the first process. An allocation apparatus comprising: an allocation unit that allocates an area from the other end of the continuous memory area.
実行中の処理に割り当てられている割当メモリ領域が、前記連続メモリ領域の一方の端部又は他方の端部のいずれから割り当てられているかを判定する判定部をさらに備え、
前記割り当て部は、前記連続メモリ領域の一方の端部又は他方の端部のうち前記実行中の処理が割り当てられていない方の端部から、前記実行中の処理以外に実行する処理の割当メモリ領域を割り当てることを特徴とする請求項1に記載の割り当て装置。
A determination unit that determines whether the allocated memory area allocated to the process being executed is allocated from one end or the other end of the continuous memory area;
The allocation unit is an allocation memory for processing to be executed other than the process being executed from one end of the continuous memory area or the other end to which the process being executed is not assigned. The allocation apparatus according to claim 1, wherein an allocation area is allocated.
前記複数の処理の各々に必要なメモリ量を示すメモリ情報を取得する取得部をさらに備え、
前記割り当て部は、前記メモリ情報に基づいて、前記複数の処理のうち必要なメモリ量が最も大きい処理のメモリ量と二番目に大きい処理のメモリ量との合計のメモリ量を有するメモリ領域を前記連続メモリ領域として設定することを特徴とする請求項1又は2に記載の割り当て装置。
An acquisition unit that acquires memory information indicating a memory amount required for each of the plurality of processes;
The allocating unit allocates a memory area having a total memory amount of a memory amount of a process requiring the largest memory amount and a memory amount of a second largest process among the plurality of processes based on the memory information. 3. The allocation device according to claim 1, wherein the allocation device is set as a continuous memory area.
前記複数の処理は、ハードウェア処理であることを特徴とする請求項1乃至3のいずれか1に記載の割り当て装置。   The allocation apparatus according to claim 1, wherein the plurality of processes are hardware processes. 物理メモリ内の複数の単位メモリ領域が順に連続して並置された連続メモリ領域を複数の処理に対して割り当てる割り当て装置におけるメモリ領域の割り当て方法であって、
割り当て手段に、前記複数の処理のうち1の処理に対して第1の割当メモリ領域を前記連続メモリ領域の一方の端部から割り当てさせるステップと、
前記割り当て手段に、前記1の処理の実行中に他の処理に対して第2の割当メモリ領域を前記連続メモリ領域の他方の端部から割り当てさせるステップと、を含むことを特徴とする割り当て方法。
A memory area allocation method in an allocation apparatus for allocating a continuous memory area in which a plurality of unit memory areas in a physical memory are sequentially juxtaposed to a plurality of processes,
Allocating a first allocated memory area to one of the plurality of processes from one end of the continuous memory area;
An allocation method comprising: causing the allocation unit to allocate a second allocated memory area to another process from the other end of the continuous memory area during execution of the first process. .
判定手段に、実行中の処理に割り当てられている割当メモリ領域が、前記連続メモリ領域の一方の端部又は他方の端部のいずれから割り当てられているかを判定させるステップと、
前記割り当て手段に、前記連続メモリ領域の一方の端部又は他方の端部のうち前記実行中の処理が割り当てられていない方の端部から、前記実行中の処理以外に実行する処理の割当メモリ領域を割り当てさせるステップと、を含むことを特徴とする請求項5に記載の割り当て方法。
Causing the determination means to determine whether the allocated memory area allocated to the process being executed is allocated from one end or the other end of the continuous memory area;
An allocation memory for processing to be executed other than the processing being executed from one end of the continuous memory area to which the processing being executed is not assigned to the allocation means. An allocation method according to claim 5, further comprising a step of allocating an area.
取得手段に、前記複数の処理の各々に必要なメモリ量を示すメモリ情報を取得させるステップと、
前記割り当て手段に、前記メモリ情報に基づいて、前記複数の処理のうち必要なメモリ量が最も大きい処理のメモリ量と二番目に大きい処理のメモリ量との合計のメモリ量を有するメモリ領域を前記連続メモリ領域として設定させるステップと、を含むことを特徴とする請求項5又は6に記載の割り当て方法。
Obtaining the memory information indicating the amount of memory necessary for each of the plurality of processes;
Based on the memory information, the allocating unit includes a memory area having a total memory amount of a memory amount of a process requiring the largest memory amount and a memory amount of a second largest process among the plurality of processes. The allocation method according to claim 5, further comprising a step of setting as a continuous memory area.
物理メモリ内の複数の単位メモリ領域が順に連続して並置された連続メモリ領域を複数の処理に対して割り当てるプログラムであって、コンピュータに、
前記複数の処理のうち1の処理に対して第1の割当メモリ領域を前記連続メモリ領域の一方の端部から割り当てるステップと、
前記1の処理の実行中に他の処理に対して第2の割当メモリ領域を前記連続メモリ領域の他方の端部から割り当てるステップと、を実行させることを特徴とするプログラム。
A program for allocating a continuous memory area in which a plurality of unit memory areas in a physical memory are sequentially juxtaposed to a plurality of processes,
Allocating a first allocated memory area to one of the plurality of processes from one end of the continuous memory area;
Allocating a second allocated memory area to another process from the other end of the continuous memory area during execution of the first process.
物理メモリ内の複数の単位メモリ領域が順に連続して並置された連続メモリ領域を複数の処理に対して割り当てるプログラムを記録する記録媒体であって、前記プログラムは、コンピュータに、
前記複数の処理のうち1の処理に対して第1の割当メモリ領域を前記連続メモリ領域の一方の端部から割り当てるステップと、
前記1の処理の実行中に他の処理に対して第2の割当メモリ領域を前記連続メモリ領域の他方の端部から割り当てるステップと、を実行させることを特徴とする記録媒体。
A recording medium for recording a program for allocating a continuous memory area in which a plurality of unit memory areas in a physical memory are sequentially juxtaposed to a plurality of processes, the program being stored in a computer,
Allocating a first allocated memory area to one of the plurality of processes from one end of the continuous memory area;
A step of allocating a second allocated memory area to another process from the other end of the continuous memory area during execution of the first process.
JP2016048335A 2016-03-11 2016-03-11 Allocation device Pending JP2017162364A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016048335A JP2017162364A (en) 2016-03-11 2016-03-11 Allocation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016048335A JP2017162364A (en) 2016-03-11 2016-03-11 Allocation device

Publications (1)

Publication Number Publication Date
JP2017162364A true JP2017162364A (en) 2017-09-14

Family

ID=59857082

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016048335A Pending JP2017162364A (en) 2016-03-11 2016-03-11 Allocation device

Country Status (1)

Country Link
JP (1) JP2017162364A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114153753A (en) * 2021-12-06 2022-03-08 海光信息技术股份有限公司 Storage resource allocation method and device and non-transitory storage medium
US12373119B2 (en) 2021-11-30 2025-07-29 Samsung Electronics Co., Ltd. Memory management method and semiconductor device adjusting size of contiguous memory allocation area

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12373119B2 (en) 2021-11-30 2025-07-29 Samsung Electronics Co., Ltd. Memory management method and semiconductor device adjusting size of contiguous memory allocation area
CN114153753A (en) * 2021-12-06 2022-03-08 海光信息技术股份有限公司 Storage resource allocation method and device and non-transitory storage medium

Similar Documents

Publication Publication Date Title
US8477852B2 (en) Uniform video decoding and display
CN109168021B (en) A method and device for pushing flow
JP5300438B2 (en) Image processing apparatus, image processing method, and program
RU2466451C2 (en) Digital data control by means of jointly used memory pool
US20110154333A1 (en) Machine system, information processing apparatus, method of operating virtual machine, and program
US20170220283A1 (en) Reducing memory usage by a decoder during a format change
CN108886633B (en) Image reception and reproduction method and device, and image generation and transmission method and device
JP4519082B2 (en) Information processing method, moving image thumbnail display method, decoding device, and information processing device
CN113892134B (en) Multimedia system with optimized performance
US20210152857A1 (en) Method, system and device for sharing contents
CN114339412B (en) Video quality enhancement method, mobile terminal, storage medium and device
JP2017162364A (en) Allocation device
CN110580238B (en) Data processing system, method of operating a data processing system, and medium
JP4585589B2 (en) Video data processing apparatus and video data processing method
WO2018226890A1 (en) Data processing method, allocation method, electronic device, client and storage media
US20100242046A1 (en) Multicore processor system, scheduling method, and computer program product
US10461956B2 (en) Semiconductor device, allocation method, and display system
CN116048792A (en) Cloud rendering method, device, equipment, storage medium and program product
JP4728083B2 (en) Media processing device
JP2007206255A (en) Display control apparatus and load distribution method
CN113190306B (en) Display hierarchy switching method, device, equipment and storage medium
KR20110101530A (en) Video converter
JP6903419B2 (en) Display system, broadcast system, and broadcast program display system
JP4694418B2 (en) Recording / reproducing apparatus, partition creation method, partition creation program, and recording medium
CN120512556A (en) Video decoding method, apparatus, device, storage medium, and program product