JP2005044218A - Image display memory management device - Google Patents

Image display memory management device Download PDF

Info

Publication number
JP2005044218A
JP2005044218A JP2003279107A JP2003279107A JP2005044218A JP 2005044218 A JP2005044218 A JP 2005044218A JP 2003279107 A JP2003279107 A JP 2003279107A JP 2003279107 A JP2003279107 A JP 2003279107A JP 2005044218 A JP2005044218 A JP 2005044218A
Authority
JP
Japan
Prior art keywords
memory
area
management
management device
block
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
JP2003279107A
Other languages
Japanese (ja)
Inventor
Chisato Kurisu
千里 栗須
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2003279107A priority Critical patent/JP2005044218A/en
Publication of JP2005044218A publication Critical patent/JP2005044218A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image displaying memory management device capable securing a maximum allocatable memory by a request from an application, returning only a necessary requirement to the application from a memory block, and dividing and managing the rest as an available space. <P>SOLUTION: When a memory request is made from the application 103, a requirement space is allocated from the available space 301, while a memory area management structure 402 associated with the allocated area (an area 401 in use) is newly created and managed as a list structure connecting the memory area management structure 404 of the available space 403 to an address sequence. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、動的メモリー確保の機構があっても、確保する容量の単位について制約を受ける装置(OS・ドライバ)上のメモリーを効率的に使用する画像表示用メモリー管理装置に関し、更に詳しくは、デジタルテレビ放送におけるデータ放送を表示するソフトウェアにおいて、圧縮画像を伸張し表示するために用いる画像表示用メモリー管理装置に関する。   The present invention relates to an image display memory management device that efficiently uses a memory on a device (OS / driver) that is restricted in terms of a unit of capacity to be secured even if there is a mechanism for securing a dynamic memory. The present invention relates to an image display memory management device used for decompressing and displaying a compressed image in software for displaying a data broadcast in a digital television broadcast.

図2は一般的なデジタルテレビ受信機の構成を示すブロック図である。テレビ放送電波はアンテナ201から入り、チューナ202により選局され復調器203により復調される。復調された信号は、TSデコーダ204により、映像・音声データと、そのほかのデータに分けられ、映像・音声データは、それぞれ映像デコーダ206、音声デコーダ205に送られ、処理される。   FIG. 2 is a block diagram showing a configuration of a general digital television receiver. Television broadcast waves enter from the antenna 201, are tuned by the tuner 202, and demodulated by the demodulator 203. The demodulated signal is divided into video / audio data and other data by the TS decoder 204, and the video / audio data is sent to the video decoder 206 and the audio decoder 205, respectively, and processed.

映像・音声以外のデータとしてはデータ放送用のデータが存在し、ブラウザという表示用ソフトウェアによって処理され、必要に応じて映像データと合成され画面上に表示される。   As data other than video / audio, there is data for data broadcasting, which is processed by display software called a browser, combined with video data as necessary, and displayed on the screen.

ブラウザにおいて扱われるデータには、文字・図形・ビットマップ画像などがあり、ビットマップ画像は、伝送データ量を削減するために、JPEGなど標準的な方法によって圧縮されて送られてくる。ブラウザはこの画像データを伸張し、ハードウェアに応じたデータ形式に変換して表示を行う。   Data handled by the browser includes characters, graphics, bitmap images, and the like. Bitmap images are sent after being compressed by a standard method such as JPEG in order to reduce the amount of transmission data. The browser decompresses this image data, converts it into a data format corresponding to the hardware, and displays it.

図9に汎用メモリー管理使用時のメモリー管理を示す。物理アドレス空間901では、確保されたメモリーは物理アドレス空間901に不連続にマッピング902され、これらのメモリーは、論理アドレス空間903では、連続した論理アドレス空間903にマッピング904される。つまり、ハードウェアに応じたデータ形式の画像表示用メモリーを汎用メモリー管理で確保した場合、物理的に連続なアドレスに割り当てられるとは限らず、表示に際してのメモリー転送時にアドレス変換、メモリーコピーが発生し、表示速度の低下を招く。   FIG. 9 shows memory management when general-purpose memory management is used. In the physical address space 901, the reserved memory is discontinuously mapped 902 in the physical address space 901, and these memories are mapped 904 in the continuous logical address space 903 in the logical address space 903. In other words, when general-purpose memory management secures an image display memory in a data format suitable for the hardware, it is not always assigned to physically continuous addresses, and address conversion and memory copying occur during memory transfer for display. In addition, the display speed is reduced.

図10に、描画時にメモリー転送を行う場合のメモリー管理を示す。描画時のメモリー転送では、上記問題を避けるため、画像表示用メモリー1003にメモリーを物理的に連続なアドレス1004に確保するための特殊なメモリー管理が必要となる。前記メモリー管理の下では、メモリー確保は本来ページと呼ばれる固定長単位で行われ、これをさらに、2のべき乗単位で管理し、上位システムに割り当てる仕組みを持つ場合がある(例えば特許文献1参照)。
実開平5−43246号公報
FIG. 10 shows memory management when memory transfer is performed during drawing. In the memory transfer at the time of drawing, in order to avoid the above problem, special memory management for securing the memory in the image display memory 1003 at physically continuous addresses 1004 is necessary. Under the memory management, the memory is originally secured in a fixed-length unit called a page, and this may be further managed in a power-of-two unit and assigned to a higher system (see, for example, Patent Document 1). .
Japanese Utility Model Publication No. 5-43246

しかしながら、ページ単位であっても2のべき乗単位であっても、上位システムで実際に必要とするメモリー量とは差が出るのが普通である。こうして生じる無駄な領域がシステムのメモリー効率の低下を招くことになる。   However, it is normal that there is a difference between the amount of memory actually required in the host system, whether it is a page unit or a power of two unit. This wasteful area will cause the memory efficiency of the system to decrease.

アプリケーションからの要求により、割り当て可能な最大のメモリーを確保し、そのメモリーブロックの中から必要量だけをアプリケーションに返し、残りを空き領域として分割し管理する。   In response to a request from the application, the maximum memory that can be allocated is secured, only the necessary amount is returned to the application from the memory block, and the remaining is divided and managed as a free area.

本発明によれば、単純なリスト処理によるメモリー管理が可能であり、既存のアプリケーションの構造を大幅に変更することなく、少ない追加プログラムで効率的な高速画像表示用メモリー管理が可能となる。   According to the present invention, memory management by simple list processing is possible, and efficient high-speed image display memory management can be performed with a small number of additional programs without significantly changing the structure of an existing application.

また、デフラグ、ガーベジコレクションなど、一般的なメモリー管理において行われる処理が省かれているが、これは、使用目的がデータ放送表示用ということもあり、画面遷移によって、画像用メモリーはほぼ全てがリフレッシュ(解放される)ため、導入しても効果が望めない。   In addition, processing performed in general memory management, such as defragmentation and garbage collection, has been omitted. This is because the purpose of use is for data broadcast display, and almost all of the image memory is changed due to screen transitions. Because it is refreshed (released), no effect can be expected even if it is introduced.

図1に本発明の概要図を示す。本発明は、動的にメモリーを確保するためのメモリー管理装置101と、本発明のメモリー管理装置102と、画像表示用メモリーを確保するためのアプリケーション103と、メモリー管理装置101によって確保されるメモリーブロック104と、アプリケーション103が実際に使用するメモリーである使用中領域105と、メモリーブロック104中の空き領域106と、ビデオRAM107及び表示装置108から構成される。   FIG. 1 shows a schematic diagram of the present invention. The present invention relates to a memory management device 101 for dynamically securing a memory, a memory management device 102 according to the present invention, an application 103 for securing an image display memory, and a memory secured by the memory management device 101. The block 104, a used area 105 that is a memory actually used by the application 103, a free area 106 in the memory block 104, a video RAM 107, and a display device 108.

図3にメモリー管理の初期状態を示す。メモリー管理装置102は、メモリー確保時にリスト構造のメモリー領域管理構造体302を作成し、固定長メモリーブロック全体を空き領域301として、空き領域301とメモリーブロック管理構造体302を対応付ける。メモリー領域管理構造体302は、開始アドレス、サイズ、空き/使用中を示すフラグから構成される。通常、確保できる固定長メモリーブロックの数は有限個に制限されているため、メモリーブロック管理のためのパラメータ(ポインタ、サイズなど)は固定長の配列として扱うことが可能である。また、メモリーブロック内の管理も、アドレス順につながったリスト構造体として管理するので、最低限、スタートアドレスへのポインタ、メモリーブロックの容量、使用フラグ(空き、または、使用中の2つの値をとる)だけの情報で管理可能である。   FIG. 3 shows an initial state of memory management. The memory management device 102 creates a list-structured memory area management structure 302 at the time of memory allocation, and associates the free area 301 with the memory block management structure 302 with the entire fixed-length memory block as the free area 301. The memory area management structure 302 includes a start address, a size, and a flag indicating free / busy. Usually, since the number of fixed-length memory blocks that can be secured is limited to a finite number, parameters (pointer, size, etc.) for memory block management can be handled as a fixed-length array. In addition, since the management in the memory block is also managed as a list structure connected in the order of addresses, at least a pointer to the start address, the capacity of the memory block, and a use flag (free or in use) are taken. ) Only information can be managed.

図4にメモリー管理のメモリー確保状態を示す。アプリケーション103からメモリー要求があった場合は、空き領域301から必要量の領域を割り当てる。そして、割り当てた領域(使用中領域401)に対応付けるメモリー領域管理構造体402を、空き領域403のメモリー領域管理構造体404とアドレスの順をつないだリスト構造として新たに作成する。メモリー確保処理については後ほど図7を用いて詳述する。   FIG. 4 shows a memory management state of memory management. When there is a memory request from the application 103, a necessary amount of area is allocated from the free area 301. Then, a memory area management structure 402 associated with the allocated area (in-use area 401) is newly created as a list structure in which the memory area management structure 404 of the free area 403 and the address order are connected. The memory securing process will be described in detail later with reference to FIG.

図5にメモリー管理のメモリー解放状態を示す。使用中領域がアプリケーション103で不要となった場合は、解放する領域504に対応するメモリー領域管理構造体503のフラグをクリアする(フラグを「空き」とする)。また、図6に示すように、解放する領域504の前後に空き領域502があった場合は、これらの領域を統合して空き領域602とする。メモリー解放処理については後ほど図8を用いて詳述する。   FIG. 5 shows the memory release state of memory management. When the used area becomes unnecessary in the application 103, the flag of the memory area management structure 503 corresponding to the area 504 to be released is cleared (the flag is set to “free”). Also, as shown in FIG. 6, when there are free areas 502 before and after the area 504 to be released, these areas are integrated into a free area 602. The memory release process will be described in detail later with reference to FIG.

次にメモリー確保処理について図7に示すフローチャートを用いて説明する。ここで、要求メモリー量が固定長メモリーブロックのサイズより大きければエラーとする(S701でNo)。   Next, the memory securing process will be described with reference to the flowchart shown in FIG. Here, if the requested memory amount is larger than the size of the fixed-length memory block, an error is determined (No in S701).

要求メモリー量が固定長メモリーブロックのサイズ以下で(S701でYes)、かつ、すでに確保された固定長メモリーブロックがなければ(S702でNo)、新たに固定長メモリーブロックを確保して空き領域として管理し(S706でYes、S707)、前記空き領域から必要量を割り当てると共に対応するメモリー領域管理構造体を作成する(S704)。そして、確保した空き領域が要求メモリーより大きい場合は(S705でYes)、残りの領域を空き領域とし、割り当てた領域に対応するメモリー領域管理構造体とアドレス順に並ぶように新たにメモリー領域管理構造体を作成する(S708)。   If the requested memory amount is less than or equal to the size of the fixed-sized memory block (Yes in S701) and there is no fixed-sized memory block already secured (No in S702), a new fixed-sized memory block is secured as a free area. Management is performed (Yes in S706, S707), a necessary amount is allocated from the free area, and a corresponding memory area management structure is created (S704). If the reserved free area is larger than the requested memory (Yes in S705), the remaining area is set as a free area, and a memory area management structure corresponding to the allocated area is newly arranged in the order of addresses. A body is created (S708).

要求メモリー量が固定長メモリーブロックのサイズ以下で(S701でYes)、かつ、すでに確保されたメモリーブロックがあれば(S702でYes)、各メモリーブロックの空き領域を検索し要求メモリーよりも大きな空き領域がなければ(S703で「見つからなかった」)、新たに要求メモリーが入るメモリーブロックを確保して空き領域として管理し(S706でYes、S707)、前記空き領域から必要量を割り当てると共に対応するメモリー領域管理構造体を作成する(S704)。そして、確保した空き領域が要求メモリーより大きい場合は(S705でYes)、残りの領域を空き領域とし、割り当てた領域に対応するメモリー領域管理構造体とアドレス順に並ぶように新たにメモリー領域管理構造体を作成する(S708)。   If the requested memory amount is less than or equal to the size of the fixed-sized memory block (Yes in S701) and there are already secured memory blocks (Yes in S702), the free space of each memory block is searched to find a free space larger than the requested memory. If there is no area (“not found” in S703), a memory block in which the requested memory is newly entered is secured and managed as a free area (Yes in S706, S707), and a necessary amount is allocated from the free area and a response is made. A memory area management structure is created (S704). If the reserved free area is larger than the requested memory (Yes in S705), the remaining area is set as a free area, and a memory area management structure corresponding to the allocated area is newly arranged in the order of addresses. A body is created (S708).

一方、要求メモリーが入る空き領域があれば(S703で「見つかった」)、それらのうち最も要求メモリー容量に近い空き領域を割り当てると共に、空き領域に対応付けられていたメモリー領域管理構造体を分裂させ、上記処理(S705、S705)を行う。割り当て方法としては、例えば、各メモリーブロックの空き領域検索中に、要求メモリーが入る空き領域があれば割り当て候補とし、ループしながら、空き領域を比較し、小さい方を候補にしていく方法をとる。ここで、メモリーを割り付けていって、空き領域が足りなくなれば、また、新たに、固定長メモリーを確保し、メモリーブロック管理構造体を作る。新たな固定長メモリーが確保できないときは、メモリーが確保できないものとしてエラーとする(S706でNo)。   On the other hand, if there is a free area in which the requested memory is stored ("found" in S703), the free area closest to the requested memory capacity is allocated among them, and the memory area management structure associated with the free area is split. The above processing (S705, S705) is performed. As an allocation method, for example, during free space search of each memory block, if there is a free space that can contain the requested memory, it is determined as an allocation candidate, and the free space is compared while looping, and the smaller one is selected as a candidate. . If memory is allocated and there is not enough free space, a fixed length memory is newly secured and a memory block management structure is created. If a new fixed-length memory cannot be secured, an error is assumed that the memory cannot be secured (No in S706).

次にメモリー解放処理について図8に示すフローチャートを用いて説明する。まず、メモリー領域管理構造体を検索し、解放対象のメモリーが属するメモリーブロックを検索する(S801)。これは、メモリー領域管理構造体がアドレス順に並んでいることから、簡単に割り出すことができる。   Next, the memory release process will be described with reference to the flowchart shown in FIG. First, a memory area management structure is searched, and a memory block to which a memory to be released belongs is searched (S801). This can be easily determined because the memory area management structures are arranged in the order of addresses.

解放対象のメモリーのメモリー領域管理構造体が見つかった場合は(S801で「見つかった」)、この領域を空き領域として、メモリー領域管理構造体のフラグを、空き領域を示す値にセットする(S802)。そして、前後の隣接するメモリーブロックの空き状態を調べ、空き領域であれば、これらの領域を統合させて管理する(S803〜S806)。   When the memory area management structure of the memory to be released is found (“found” in S801), this area is set as a free area, and the flag of the memory area management structure is set to a value indicating the free area (S802). ). Then, the vacant states of adjacent memory blocks before and after are checked, and if they are vacant areas, these areas are integrated and managed (S803 to S806).

固定長ブロック内で確保されているメモリーがすべて空き状態のメモリーであれば、これを解放し(S807でYes)、メモリー領域管理構造体を初期化する(S808)。   If all the memory secured in the fixed-length block is an empty memory, it is released (Yes in S807), and the memory area management structure is initialized (S808).

なお、本実施の形態では、メモリー領域管理構造体をリスト構造としているが、このとき、このメモリー領域管理構造体自体を本機構で動的確保をしないように気をつける必要がある。なぜなら、メモリー領域管理構造体を確保するためにメモリー領域管理構造体を作成するという無限循環を起こしてしまうためである。これを避けるには、確保するメモリーブロックの頭にメモリー領域管理構造体をつけるなどという手法が考えられる。   In this embodiment, the memory area management structure has a list structure. At this time, however, care must be taken not to dynamically secure the memory area management structure itself with this mechanism. This is because an infinite cycle of creating a memory area management structure to secure the memory area management structure occurs. One way to avoid this is to attach a memory area management structure to the head of the memory block to be secured.

本発明の画像表示用メモリー管理装置は、アプリケーションからの要求により、割り当て可能な最大のメモリーを確保し、そのメモリーブロックの中から必要量だけをアプリケーションに返し、残りを空き領域として分割して管理できるため、全てのテレビジョン放送受信機に適用できる。   The image display memory management device according to the present invention secures the maximum allocatable memory in response to a request from the application, returns only the necessary amount from the memory block to the application, and divides the remaining as a free area for management. Therefore, it can be applied to all television broadcast receivers.

本発明の概要を示す図The figure which shows the outline | summary of this invention デジタルテレビの構成を示すブロック図Block diagram showing the structure of a digital TV 本発明の実施の形態に係るメモリー管理の初期状態を示す図The figure which shows the initial state of the memory management which concerns on embodiment of this invention 同実施の形態に係るメモリー管理のメモリー確保状態を示す図The figure which shows the memory allocation state of the memory management based on the embodiment 同実施の形態に係るメモリー管理のメモリー解放状態を示す図The figure which shows the memory release state of the memory management which concerns on the same embodiment 同実施の形態に係るメモリー管理のメモリー解放時の空き領域統合状態を示す図The free area integration status at the time of memory release for memory management according to the same embodiment 同実施の形態に係るメモリー確保処理を示すフローチャートA flowchart showing a memory securing process according to the embodiment 同実施の形態に係るメモリー解放処理を示すフローチャートFlow chart showing memory release processing according to the embodiment 従来の汎用メモリー管理使用時のメモリー管理状態を示す図Diagram showing memory management status when using conventional general-purpose memory management 従来の描画時のメモリー転送を行う際のメモリー管理状態を示す図The figure which shows the memory management state when performing the memory transfer at the time of conventional drawing

符号の説明Explanation of symbols

101、102 メモリー管理装置
103 アプリケーション
104 メモリーブロック
105、401 使用中領域
106、403、502、602 空き領域
107 ビデオRAM
108 表示装置
301 固定長メモリーブロック
302、402、404、501、503、601 メモリー領域管理構造体
504 解放される領域
101, 102 Memory management device 103 Application 104 Memory block 105, 401 Used area 106, 403, 502, 602 Free area 107 Video RAM
108 display device 301 fixed-length memory block 302, 402, 404, 501, 503, 601 memory area management structure 504 freed area

Claims (2)

画像表示用メモリーを、高速転送可能な物理アドレス連続な領域に確保し管理する場合に、確保したメモリーブロックを複数の領域に分け、単純なロジックおよび最小限の管理情報で効率よく利用するためのメモリー管理装置。 When securing and managing the image display memory in a continuous area of physical addresses that can be transferred at high speed, the allocated memory block is divided into multiple areas for efficient use with simple logic and minimal management information Memory management device. ページ(ブロック)単位、2のべき乗単位などでメモリーを管理する装置において、確保したメモリーブロックを複数の領域に分け、単純なロジックで効率よく利用するためのメモリー管理装置。 A memory management device for managing memory in page (block) units, power-of-two units, etc., and dividing the reserved memory blocks into a plurality of areas for efficient use with simple logic.
JP2003279107A 2003-07-24 2003-07-24 Image display memory management device Pending JP2005044218A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003279107A JP2005044218A (en) 2003-07-24 2003-07-24 Image display memory management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003279107A JP2005044218A (en) 2003-07-24 2003-07-24 Image display memory management device

Publications (1)

Publication Number Publication Date
JP2005044218A true JP2005044218A (en) 2005-02-17

Family

ID=34265327

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003279107A Pending JP2005044218A (en) 2003-07-24 2003-07-24 Image display memory management device

Country Status (1)

Country Link
JP (1) JP2005044218A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008033838A (en) * 2006-07-31 2008-02-14 Sanyo Electric Co Ltd Memory management device and memory management method
JP2015203990A (en) * 2014-04-14 2015-11-16 京セラドキュメントソリューションズ株式会社 Electronic device and memory management method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008033838A (en) * 2006-07-31 2008-02-14 Sanyo Electric Co Ltd Memory management device and memory management method
JP2015203990A (en) * 2014-04-14 2015-11-16 京セラドキュメントソリューションズ株式会社 Electronic device and memory management method

Similar Documents

Publication Publication Date Title
US9400754B2 (en) Asynchronous swap mechanism and page eviction from memory
JP3268980B2 (en) Data buffering system
EP2750042B1 (en) Method and apparatus for managing memory
CN1529979A (en) Method for selecting executable softwave image
CN1975702A (en) Apparatus and methods for controlling output of clock signal and systems including the same
EP3812904B1 (en) Swap area in memory using multiple compression algorithms
US7865632B2 (en) Memory allocation and access method and device using the same
JP2978519B2 (en) Document data display method and system
US20060143313A1 (en) Method for accessing a storage device
JP2005044218A (en) Image display memory management device
US7864359B2 (en) Data compression and decompression unit
CN110109677B (en) Dynamic object cache pool allocation method
CN108681469B (en) Page caching method, device, equipment and storage medium based on Android system
CN101896882A (en) Information processing device
US20110283068A1 (en) Memory access apparatus and method
US6771271B2 (en) Apparatus and method of processing image data
EP1267272B1 (en) A specialized memory device
CN101847394B (en) Storage mapping method and device for encoding and displaying video files
JP2003296156A (en) Information recording management device, data recording and regenerating device, information recording management method and file management method
TW200949554A (en) Image processing system and data processing method thereof
US7154559B2 (en) Video apparatus, notably video decoder, and process for memory control in such an apparatus
CN110764707A (en) Data processing method and device
US20030098867A1 (en) Method for using local memory of graphics card as extensive memory of system memory in computer system
JP4065194B2 (en) Image forming apparatus
JP2001022640A (en) Memory managing method