JP2011175395A - Information processor, image reading device, portable terminal, memory control method for information processor, and program - Google Patents
Information processor, image reading device, portable terminal, memory control method for information processor, and program Download PDFInfo
- Publication number
- JP2011175395A JP2011175395A JP2010038154A JP2010038154A JP2011175395A JP 2011175395 A JP2011175395 A JP 2011175395A JP 2010038154 A JP2010038154 A JP 2010038154A JP 2010038154 A JP2010038154 A JP 2010038154A JP 2011175395 A JP2011175395 A JP 2011175395A
- Authority
- JP
- Japan
- Prior art keywords
- memory
- application
- area
- securing
- request
- 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
Links
- 238000000034 method Methods 0.000 title claims description 132
- 238000012545 processing Methods 0.000 claims abstract description 103
- 230000004044 response Effects 0.000 claims abstract description 19
- 230000008569 process Effects 0.000 claims description 122
- 230000010365 information processing Effects 0.000 claims description 49
- 230000006870 function Effects 0.000 claims description 15
- 238000004891 communication Methods 0.000 claims description 11
- 238000007906 compression Methods 0.000 claims description 7
- 238000003379 elimination reaction Methods 0.000 claims description 5
- 238000013467 fragmentation Methods 0.000 claims description 5
- 238000006062 fragmentation reaction Methods 0.000 claims description 5
- 238000013265 extended release Methods 0.000 claims 1
- 230000007246 mechanism Effects 0.000 abstract description 125
- 230000006866 deterioration Effects 0.000 abstract 1
- 238000006243 chemical reaction Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 8
- 230000015556 catabolic process Effects 0.000 description 6
- 230000007423 decrease Effects 0.000 description 6
- 238000006731 degradation reaction Methods 0.000 description 6
- 238000013507 mapping Methods 0.000 description 5
- 230000006835 compression Effects 0.000 description 4
- 239000004973 liquid crystal related substance Substances 0.000 description 4
- 230000008030 elimination Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000002542 deteriorative effect Effects 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Images
Landscapes
- Memory System (AREA)
Abstract
Description
本発明は、メモリ確保要求を受けた際に物理メモリ領域の確保を行い、メモリ解放要求を受けた際に前記確保した物理メモリ領域の解放を行うオペレーティングシステムで動作する情報処理装置のメモリ制御に関する。 The present invention relates to memory control of an information processing apparatus operating in an operating system that secures a physical memory area when receiving a memory securing request and releases the secured physical memory area when receiving a memory release request. .
オペレーティングシステム(OS)は、様々なタスクから要求されるメモリ確保を一つの物理メモリというリソースを利用して分配する機能を持っている。 The operating system (OS) has a function of distributing memory reservation required by various tasks using a resource called a single physical memory.
特許文献1では、様々なタスクから要求される物理メモリへのメモリ確保を含むアクセスをバスのロックフラグで実現し、メモリの利用効率とパフォーマンス向上の両立させる技術が開示されている。 Japanese Patent Application Laid-Open No. 2004-228561 discloses a technique for realizing access including physical memory allocation required by various tasks with a bus lock flag to achieve both improvement in memory utilization and performance.
一方、OSには、メモリ確保・解放要求を受けた時点で物理メモリ領域の確保・解放を行うものと、メモリ確保要求・解放を受けた時点では物理メモリ領域の確保・解放は行わずに実際にメモリ領域へのアクセスが発生した時点で物理メモリ領域の確保・解放を行うものがある。一般的に前者は後者よりメモリ確保・解放要求時の処理に時間がかかることが知られている。 On the other hand, in the OS, the physical memory area is secured / released when the memory allocation / release request is received, and the physical memory area is not allocated / released when the memory allocation request / release is received. In some cases, the physical memory area is secured / released when the memory area is accessed. In general, it is known that the former takes more time to process a memory reservation / release request than the latter.
また、OSには、メモリ使用効率を向上させるために、使用中のメモリ領域の圧縮処理や断片化解消処理やクリア処理などを行う高度なメモリ管理機能を有するものがある。このようなOSで動作する装置では、OSに対してメモリ確保要求や解放要求を行うタイミングで前記メモリ使用効率を上げる処理が発生していた。これらの処理は、物理メモリへのアクセス回数が多くなるため、処理に時間がかかることが知られている。 Some OSs have an advanced memory management function for performing compression processing, defragmentation processing, clear processing, and the like of a memory area in use in order to improve memory use efficiency. In such an apparatus operating on the OS, processing for increasing the memory use efficiency occurs at the timing when a memory securing request or a release request is issued to the OS. These processes are known to take time because the number of accesses to the physical memory increases.
上述の高度なメモリ管理が行われているOSを採用した場合、メモリの使用効率を重視するために、メモリ確保処理の中で、使用中のメモリ領域の圧縮処理や断片化解消処理やクリア処理などが行われ、その結果としてメモリの確保処理や解放処理のパフォーマンスが低下してしまっているものが存在する。 When the above-mentioned OS with advanced memory management is adopted, in order to place importance on the memory usage efficiency, the memory allocation process used in the memory allocation process is compressed, defragmented, and cleared. As a result, the performance of the memory allocation process and the release process has been reduced.
また、上述の高度なメモリ管理は行われなくとも、メモリ確保要求を受けた時点で物理メモリ領域の確保を行うOSは、メモリ確保要求を受けた時点では物理メモリ領域の確保は行わずに実際にメモリ領域へのアクセスが発生した時点で物理メモリ領域の確保を行うOSより、メモリ確保要求時の処理に時間がかかってしまう。 Even if the above-described advanced memory management is not performed, the OS that secures the physical memory area at the time of receiving the memory securing request does not actually secure the physical memory area at the time of receiving the memory securing request. When an access to the memory area occurs, the OS that secures the physical memory area takes time to process the memory securing request.
よって、これらのOSを採用した装置の場合、アプリケーションがメモリの確保や解放をOSに要求する際にパフォーマンスが低下してしまう可能性がある。 Therefore, in the case of an apparatus using these OSs, there is a possibility that the performance may be lowered when an application requests the OS to secure or release memory.
例えば、画像処理を行うアプリケーションでは、画像を展開し、処理を行うため、メモリ確保要求と解放要求が数多く行われ、また、必要とする画像メモリの容量も大きく、上述のようなOS上で実行された場合、パフォーマンスが低下してしまう可能性がある。 For example, in an application that performs image processing, a large number of memory allocation requests and release requests are made in order to expand and process images, and a large amount of image memory is required, which is executed on the OS as described above. If this happens, performance may decrease.
また、近年の携帯端末では、ウェブページを表示するアプリケーション(ウェブブラウザ)や、画像処理等の各種アプリケーションを実行可能なものがあるが、携帯端末等には必ずしも物理メモリが潤沢に存在するとはいえない。
このため、容量が不定なウェブページの表示や画像処理を行う等の使用するメモリ容量の大きいアプリケーションが、上述のようなOSで動作する携帯端末で実行された場合、パフォーマンスが低下してしまう可能性がある。
Moreover, in recent portable terminals, there are applications (web browsers) that display web pages and various applications such as image processing, but it can be said that the portable terminals and the like do not necessarily have plenty of physical memory. Absent.
For this reason, when an application with a large memory capacity to be used, such as displaying a web page with an undefined capacity or performing image processing, is executed on a portable terminal operating on the OS as described above, the performance may be degraded. There is sex.
本発明は、上記の問題点を解決するためになされたもので、本発明の目的は、例えば、メモリ確保・解放要求を受けた際に物理メモリ領域の確保・解放を行うOSや、高度なメモリ管理機能を有するOS等のようにメモリ確保解放動作が比較的遅いOSを用いた情報処理装置において、当該OSに対するメモリ確保・解放要求を行う回数を減らし、アプリケーションのパフォーマンス低下を抑える仕組みを提供することである。 The present invention has been made to solve the above-described problems. The object of the present invention is, for example, an OS that secures / releases a physical memory area when a memory secure / release request is received, In an information processing apparatus using an OS that has a relatively slow memory allocation / release operation, such as an OS having a memory management function, a mechanism is provided to reduce the number of memory allocation / release requests to the OS and suppress the performance degradation of the application. It is to be.
本発明は、メモリ確保要求を受けた際に物理メモリ領域の確保を行い、メモリ解放要求を受けた際に前記確保した物理メモリ領域の解放を行うオペレーティングシステムで動作する情報処理装置であって、アプリケーションプログラムからの最初のメモリ確保要求に応じて、前記オペレーティングシステムに対して所定容量のメモリ確保要求を行って、前記所定容量のメモリ領域を確保する確保手段と、前記アプリケーションプログラムからのメモリ確保要求に応じて、前記確保手段で確保したメモリ領域内の前記アプリケーションプログラムへ割り当てていない状態の領域を、前記アプリケーションプログラムに対して割り当てる割当手段とを有することを特徴とする。 The present invention is an information processing apparatus that operates in an operating system that secures a physical memory area when receiving a memory securing request and releases the secured physical memory area when receiving a memory release request, In response to an initial memory securing request from the application program, a securing means for securing a memory area of the predetermined capacity by making a memory securing request of the predetermined capacity to the operating system, and a memory securing request from the application program And an allocating unit that allocates, to the application program, an area that is not allocated to the application program in the memory area secured by the securing unit.
本発明によれば、予め所定容量のメモリを確保しておくことにより、オペレーションシステムに対するメモリ確保要求、メモリ解放要求の回数を実質的に減らし、アプリケーションからのメモリ確保要求やメモリ解放要求に速やかに対応し、アプリケーションを無駄に待たせないことで、アプリケーションのパフォーマンス低下を抑えることができる。 According to the present invention, by securing a predetermined amount of memory in advance, the number of memory securing requests and memory releasing requests to the operating system is substantially reduced, and a memory securing request and memory releasing request from an application can be promptly met. Correspondingly, the application performance can be prevented from deteriorating by not waiting the application unnecessarily.
以下、本発明を実施するための形態について図面を用いて説明する。 Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.
図1は、本発明の実施例1を示す情報処理装置を適用した画像読取装置の概略構成を示す斜視図である。
図1に示すように、本実施例の画像読取装置1は、ネットワーク型スキャナであり、装置本体を構成する下部ユニット10と、この下部ユニット10に対してヒンジ等のリンク部材を介して開閉自在に支持され閉状態で下部ユニット10との間に原稿の搬送路(図示なし)を形成する上部ユニット20とを備えている。
FIG. 1 is a perspective view showing a schematic configuration of an image reading apparatus to which an information processing
As shown in FIG. 1, the
また、本実施例では、下部ユニット10の上端部には、原稿が積載される給紙トレイ11が設けられている。そして、給紙トレイ11上に積載される原稿は、下部ユニット10と上部ユニット20との間の搬送路に沿って自動搬送され、装置内部の後述する画像読取部により画像の読取処理が実行される。なお、画像読取を終えた原稿は、下部ユニット10の下端部に設けられた排紙トレイ12に向かって排出されるようになっている。
In this embodiment, a
さらに、本実施例の画像読取装置1は、上部ユニット20の前面に各種情報を表示する情報表示部21が配設されている。ここで、情報表示部21は、例えば、本実施例では、液晶パネル21aと、ユーザ操作を受け付ける透明なタッチパネル21bとからなる。即ち、情報表示部21では、液晶パネル21aを介して、例えば、画像読取部で読み取った原稿画像を表示したり、読取モードの設定や各種設定に用いる設定画面を表示したりすることができる。また、ユーザは、タッチパネル21bを用いることにより、例えば、液晶パネル21aに設定画面や入力画面等を表示させながら、各種設定項目の入力を直接行うことができる。
Further, the
ここで、図2を参照し、本発明の情報処理装置を適用した画像読取装置1の機能を示す構成要素について説明する。
Here, with reference to FIG. 2, components that indicate functions of the
図2は、本発明の情報処理装置を適用した画像読取装置1の機能ブロック図である。
図2に示すように、本実施例の画像読取装置1は、情報を伝達するシステムバス30に対し、ADF(Auto Document Feeder)スキャナ部となる画像読取部31と、この画像読取部31等を制御するCPU(Central Processing Unit)や後述するアドレステーブルを用いて仮想アドレスを物理アドレスに変換する機能を有するMMU(Memory Management Unit)を含む制御部32と、スキャン動作を指示する処理方法や読取設定情報等の各種データやプログラムを格納する不揮発性のフラッシュメモリからなる記録媒体33と、読み取った画像データや各種のデータやプログラムなどを一時的に蓄積するRAM(Random Access Memory)34とがそれぞれ接続されている。なお、画像読取部31とシステムバス30とは、例えば、USBインタフェース等の所定のインタフェースを介して接続される構成であってもよい。また、制御部32のMMUは、CPU(プロセッサ)に内蔵されたモジュールであってよいし、CPUに結合された別のチップであってよい。
FIG. 2 is a functional block diagram of the
As shown in FIG. 2, the
また、システムバス30には、GUIを表示する液晶パネル21aと、GUI(Graphical User Interface)を用いた操作を受け付けるタッチパネル21bとからなる情報表示部21が接続されている。さらに、システムバス30には、読み込まれた画像データ等を他のコンピュータ(PC(Personal Computer)、クライアントコンピュータ等を含む)やサーバー(ホストコンピュータや、セグメント間の通信を中継するサーバー等を含む)等に送信する外部通信インタフェース35が接続されている。
In addition, an
なお、制御部32のCPUは、記録媒体33に記録されたプログラム(オペレーティングシステムに対応するプログラムやアプリケーションプログラム)を実行することにより、画像読取装置1を制御する。
The CPU of the
図3は、本実施例の情報処理装置上で動作するオペレーティングシステムのメモリ確保動作を示す模式図である。
アプリケーションプログラム(以下、アプリケーション)44がメモリを確保するためには、アプリケーション44は、オペレーティングシステム(以下、OS)のインタフェース(Windows(登録商標)の場合、例えばVirtualAlloc API)を用いて、仮想メモリ管理モジュール43(即ち、OSのメモリ管理機能の1つ)にメモリ確保の要求をする。なお、OSのメモリ管理機能は、アプリケーションが起動されると、該アプリケーションに対して、仮想メモリ空間とアドレステーブルを提供する。アドレステーブルは、物理メモリ(RAM34)上等で記憶管理される。なお、アドレステーブル変換モジュール42(上述したMMUやOSのメモリ管理機能等で構成される)は、このアドレステーブルを用いて仮想メモリ上の仮想アドレスを物理メモリ(RAM34)上の物理アドレスに変換する。なお、MMU内に、アドレステーブルの複製を保持し、上記アドレス変換を高速に行う構成もある。
FIG. 3 is a schematic diagram illustrating a memory securing operation of the operating system that operates on the information processing apparatus according to the present exemplary embodiment.
In order for an application program (hereinafter referred to as an application) 44 to secure a memory, the
メモリ確保が要求されたOSの仮想メモリ管理モジュール43は、仮想メモリのアドレステーブルに基づいて仮想メモリを物理メモリに割り当てるアドレステーブル変換モジュール42にメモリ割り当てを要求する。
要求されたアドレステーブル変換モジュール42は、物理メモリアクセスモジュール41を介して物理メモリの空き領域を探索し(領域予約し)、物理メモリの空き領域のアドレスを取得し、物理メモリの空き領域を仮想メモリの空き領域に関連付ける情報をアドレステーブルにセットする。
即ち、物理メモリの領域を仮想メモリの領域に割り当てる(マップする)。さらに、アドレステーブル変換モジュール42は、上述のように物理メモリの領域が割り当てられた(マップされた)仮想メモリの領域の先頭アドレスを、仮想メモリ管理モジュール43介して、確保したメモリの先頭アドレスとしてアプリケーション44に返す。
The virtual
The requested address
That is, the physical memory area is allocated (mapped) to the virtual memory area. Further, the address
このように、本発明の情報処理装置(画像読取装置1)上で動作するOSは、アプリケーション44からメモリ領域の確保要求(メモリ確保要求)を受けた際に物理メモリの割り当てを行う(物理メモリを確保する)ものである。また、アプリケーション44からメモリ解放要求を受けた際に物理メモリの割り当てを解除する(物理メモリを解放する)ものである。よって、本発明の情報処理装置上で動作するOSは、アプリケーションプログラムからメモリ領域の確保要求を受けても実際にそのメモリにアクセスされるまでは物理メモリの割り当てを行わないようなOSとは異なり、メモリ確保、解放時の動作が比較的遅くなってしまう。このため、アプリケーション44が頻繁にメモリ確保を要求する場合、動作速度の低下を招いてしまうおそれがある。
As described above, the OS operating on the information processing apparatus (image reading apparatus 1) of the present invention allocates physical memory when receiving a memory area securing request (memory securing request) from the application 44 (physical memory). Secure). In addition, when a memory release request is received from the
また、物理メモリが潤沢に存在するシステムでは、アドレステーブル変換モジュール42は、すぐさま物理メモリの空き領域を探して仮想メモリに割り当てる物理アドレスを返すことが出来る。しかし、本実施例の画像読取装置1のように、組み込み機器等の物理メモリが少ないシステムのOSや、仮想メモリの管理に厳密な言語で作成されたプログラムでは、アドレステーブル変換モジュール42で物理メモリ領域を確保する前に、仮想メモリや物理メモリの使用中メモリ領域の圧縮処理や断片化解消処理やクリア処理が発生する。このため、アドレステーブル変換モジュール42の反応が遅くなってしまう。このようなアドレス変換処理は、アプリケーション44がメモリ確保を仮想メモリに要求するたびに発生するため、メモリを頻繁に確保、解放するシステムではさらなる動作速度の低下を招いてしまう。なお、本実施例の画像読取装置1では、OSのアドレステーブル変換モジュール42の仕様により物理メモリを例えば512MBしか認識できないものとするが、本発明はこれに限定されるものではない。
Further, in a system with abundant physical memory, the address
図4は、本発明の実施例1に係る画像読取装置1のメモリ確保シーケンス図である。
図4において、50はメモリ管理機構である。一般的なメモリ確保シーケンスでは、図3に示したように、アプリケーション44が直接、仮想メモリ管理モジュール43(即ち、OSのメモリ管理機能の1つ)にメモリ確保解放処理を呼び出すため、メモリ管理機構50が存在しない状態と同じになる。
FIG. 4 is a memory allocation sequence diagram of the
In FIG. 4, 50 is a memory management mechanism. In a general memory allocation sequence, as shown in FIG. 3, the
そのため、一般的なメモリ確保シーケンスでは、メモリ確保・解放処理で比較的時間がかかるOSで動作する情報処理装置においては、図3で説明したような動作速度の低下を招いてしまう。 For this reason, in a general memory allocation sequence, an information processing apparatus operating on an OS that takes a relatively long time for memory allocation / release processing causes a decrease in the operation speed as described with reference to FIG.
そこで本発明では、アプリケーション44から直接、仮想メモリ管理モジュール43(OS)のメモリ確保処理を呼び出す代わりに、アプリケーション44から(メモリ確保要求として)メモリ管理機構50のメモリ確保処理を呼び出す構成とする。また、アプリケーション44から直接、仮想メモリ管理モジュール43(OS)のメモリ解放処理を呼び出す代わりに、アプリケーション44から(メモリ解放要求として)メモリ管理機構50のメモリ解放処理を呼び出す構成とする。このように、アプリケーション44からメモリ管理機構50のメモリ確保処理・解放処理を用いることにより、アドレステーブル変換モジュール42で発生するメモリ確保処理・メモリ解放処理の実行回数を実質的に減らし、実行速度の低下を防ぐものとする。そのための処理の流れは図6以降にて説明する。
メモリ管理機構50は、制御部32内のCPUが記録媒体33にコンピュータ読み取り可能に記録されたプログラムを読み出して実行することにより実現されるものであり、本発明の確保手段、割当手段、割当解除手段、解放手段等を有する。
Therefore, in the present invention, instead of calling the memory securing process of the virtual memory management module 43 (OS) directly from the
The
なお、アプリケーション44は、画像読取部31により取得される画像データを物理メモリ(RAM34)に格納して画像処理し、記録媒体33に出力する(記録媒体33に記録する)ものとする。本発明ではパフォーマンスを要求し、かつ要求するメモリサイズが大きく、またメモリ確保要求、メモリ解放要求の回数が多い画像メモリ(上述の画像データを格納するためのメモリ)の確保及び解放時に、アプリケーション44がメモリ管理機構50を用いるものとする。即ち、アプリケーション44は、画像読取部31により取得される画像データを記憶するためにメモリ管理機構50にメモリ確保要求を行い、前記画像データを記憶するために割り当てられたメモリ領域をメモリ管理機構50に返却するためにメモリ解放要求を行う。よって、アプリケーションプログラム44は、画像読取部31で画像の読み取りを行う際にメモリ管理機構50にメモリ確保要求を行い、画像データの処理を完了した際にメモリ管理機構50にメモリ解放要求を行う。なお、アプリケーション44は、画像メモリの確保・解放かそれ以外のメモリ確保・解放かを区別できる構成とする。
Note that the
また、本発明のメモリ管理機構50のメモリ確保処理、及び、解放処理の機能は、ライブラリ等のプログラムで提供され、アプリケーション44からこれらのプログラムを呼び出すことにより、実行可能である。
The functions of the memory securing process and the releasing process of the
以下、図5を参照して、本発明のメモリ管理機構50がメモリ管理に用いる標準メモリ管理テーブルについて説明する。
図5は、本発明の実施例1におけるメモリ管理機構50のメモリ管理テーブルの一例を示す図である。
図5において、51は標準メモリ管理テーブルであり、本発明の管理手段に対応する。標準メモリ管理テーブル51において、列52は、メモリ管理番号を示している。列52は、メモリ管理番号に対応するアドレスのメモリ確保状態を示している。そして、標準メモリ管理テーブル51の各行が、それぞれメモリ管理番号(列52)と、メモリ確保状態(列53)との対応を示している。本実施例では、標準メモリ管理テーブル51は、65536個の要素が存在し、一つの要素(メモリ管理番号ごと)あたり4KBのメモリの使用状態を記憶している。
Hereinafter, a standard memory management table used for memory management by the
FIG. 5 is a diagram illustrating an example of a memory management table of the
In FIG. 5, 51 is a standard memory management table, which corresponds to the management means of the present invention. In the standard memory management table 51, a
この標準メモリ管理テーブル51は、画像読取装置1内部でアプリケーションから最初のメモリ確保要求が行われた時に(即ち、メモリ管理機構50のメモリ確保要求処理が最初に呼び出された時に)、メモリ管理機構50により、RAM34上に作成される。この際、メモリ管理機構50は、所定のメモリ量(例えば、OSに一度に予約可能な最大メモリ容量、本実施例では256MBとする)の仮想メモリを予約するようにOSに要求する(Windows(登録商標)の場合、例えばVirtualAlloc APIを用いてOSに仮想メモリの予約を要求する)。OSは、この要求に応じて、上記アプリケーションの仮想メモリ内の領域を予約する。この予約処理により、メモリ管理機構50は連続したメモリ領域を確保可能となる。さらに、メモリ管理機構50は、標準メモリ管理テーブル51を作成した際に、標準メモリ管理テーブル51内の全てのメモリ管理番号に対応する領域(全領域)の状態を「未確保」と初期化しておく。なお、メモリ確保状態には、「未確保」、「未使用」、「先頭」、「使用中」がある。まず、「未確保」は、メモリ管理番号に対応する仮想メモリ領域(4KB)に対して、物理メモリが割り当てられていない状態を示す(未確保領域)。「未使用」は、メモリ管理番号に対応する仮想メモリ領域に対して物理メモリが割り当ている状態(使用可能な状態)で且つアプリケーションへ割り当てられていない状態を示す(未使用領域)。「先頭」及び「使用中」は、メモリ管理番号に対応する仮想メモリ領域が、メモリ管理機構50のメモリ確保処理によりアプリケーションに割り当てられている状態(アプリケーションが使用している状態)を示す(使用領域)。なお、「先頭」は、上記アプリケーションに割り当てられている領域の先頭領域、「使用中」は先頭領域以外の領域を示す。このような標準メモリ管理テーブル51を設けることにより、メモリ管理機構50は、上述の予約したメモリ領域内の状態(確保の有無、アプリケーションへの割り当ての有無等)を管理することができる。
The standard memory management table 51 is stored in the memory management mechanism when the first memory reservation request is made by an application in the image reading apparatus 1 (that is, when the memory reservation request process of the
以下、図6、図7を参照して、実施例1の画像読取装置1におけるメモリ確保シーケンス処理、及び、メモリ解放シーケンス処理について説明する。
図6は、本発明の実施例1に係る情報処理装置を適用した画像読取装置のメモリ確保シーケンス処理(メモリ管理機構50のメモリ確保処理)を示したフローチャートである。図中、S601〜S607は各ステップを示す。なお、このフローチャートの処理は、制御部32内のCPUが記録媒体33にコンピュータ読み取り可能に記録されたプログラムを読み出して実行することにより実現される。また、このメモリ確保処理は、アプリケーション44からメモリ管理機構50にメモリ確保指示(メモリ確保要求)があった時にメモリ管理機構50で実行される。
Hereinafter, the memory allocation sequence process and the memory release sequence process in the
FIG. 6 is a flowchart showing a memory securing sequence process (memory securing process of the memory management mechanism 50) of the image reading apparatus to which the information processing apparatus according to the first embodiment of the present invention is applied. In the figure, S601 to S607 indicate each step. Note that the processing in this flowchart is realized by the CPU in the
まず、S601において、メモリ管理機構50(制御部32内のCPU)は、今回のメモリ確保要求がアプリケーション44から仮想メモリに対して行われる最初のメモリ確保要求かどうか(即ち、メモリ未確保かどうか)を判定する。なお、本実施例では最初のメモリ確保要求かどうかは、図5の標準メモリ管理テーブル51のメモリ管理番号1番が「未確保」状態かどうかで判断する。即ち、標準メモリ管理テーブル51のメモリ管理番号1番が「未確保」状態であった時に最初のメモリ確保要求であると判断する。また、S601の時点で、標準メモリ管理テーブル51が作成されていない場合も、メモリ管理機構50は、最初のメモリ確保と判断し、この場合、上述の手順で標準メモリ管理テーブル51を作成するものとする。
First, in step S601, the memory management mechanism 50 (the CPU in the control unit 32) determines whether or not the current memory reservation request is the first memory reservation request made from the
上記S601において、メモリ確保要求が最初(1回目)のメモリ確保要求(メモリ未確保)であると判定した場合、メモリ管理機構50は、所定容量(予めアプリケーション44の処理全体で必要とされているメモリ量)が物理メモリ上に空きメモリとして存在するかどうかを調べるために、S602に処理を進める。
If it is determined in S601 that the memory allocation request is the first (first) memory allocation request (memory not yet allocated), the
なお、予め処理全体で必要とされているメモリの使用量は記録媒体33上に値が格納されているものとする。本実施例の場合では、49152ブロック分を予め確保する確保量とする。この確保量は、画像読取装置1のアプリケーションプログラムの設定によって必要なメモリ量に変動する。本実施例の画像読取装置1では、画像読取装置1の画像読取部31が一度の読み取り処理で読み取り可能な画像データの容量に応じて決定してもよい。例えば、上記確保量は、画像読取部31が一度の読み取り処理で原稿の両面を読み取り可能な装置であれば、画像読取部31で読み取る原稿片面あたりの画像データの読み取りサイズの少なくとも3倍のメモリ量としてもよい。また、上記確保量は、画像読取部31が一度の読み取り処理で原稿の片面を読み取る装置であれば、画像読取部31で読み取る原稿片面あたりの画像データの読み取りサイズの少なくとも2倍のメモリ量としてもよい。即ち、上記確保量は、画像読取部31で読み取る原稿片面あたりの画像データの読み取りサイズの少なくとも複数倍のメモリ量としてもよい。なお、画像読取部31で読み取られ物理メモリに格納された画像データの、アプリケーション44による画像処理単位は、原稿片面の画像データ単位である。即ち、上記確保量は、画像読取部31が一度の読み取り処理で読み取る画像データのサイズに、アプリケーション44での画像処理単位(原稿片面)の画像データのサイズを、加算したサイズに対応するメモリ量としてもよい。
また、上記確保量は、OSに一度に要求可能な最大メモリ容量からシステム使用容量(上記予め確保するメモリ以外に、制御部32のCPUが使用する容量)を差し引いたメモリ量としてもよい。
It is assumed that the memory usage required for the entire process is stored on the
Further, the secured amount may be a memory amount obtained by subtracting the system use capacity (capacity used by the CPU of the
S602では、メモリ管理機構50は、予め処理全体で必要とされているメモリ量が物理メモリ上に空きメモリとして存在するかどうかを判定する。そして、S602において、必要とされているメモリ量が物理メモリ上に空きメモリとして存在しないと判定した場合、メモリ管理機構50は、メモリ不足をアプリケーション44に通知するために、S605へ処理を進める。
In S602, the
一方、S602において、必要とされているメモリ量が物理メモリ上に空きメモリとして存在すると判定した場合、メモリ管理機構50は、処理全体で必要な量を実際に確保するために、S603(確保処理)へ処理を進める。このS602の処理により、アプリケーション44で必要とされる空きメモリ量が物理メモリ上に存在する場合にのみ、OSにメモリ確保要求を行うように制御でき、確保できない容量のメモリをOSに要求してエラーとなってしまうといった無駄を回避することができる。即ち、アプリケーション44で必要とされる空きメモリ量が存在しない場合には、アプリケーション44を待たせることなく、速やかにエラー処理を行うことができる。
On the other hand, if it is determined in S602 that the required amount of memory exists as free memory on the physical memory, the
S603では、メモリ管理機構50は、必要とされているメモリ量が物理メモリ上に空きメモリとして存在していることが分かっているので、処理全体で必要なメモリ量を実際に確保するようにOSにメモリ確保要求を行う(OSがWindows(登録商標)の場合、例えばVirtualAlloc APIを用いてOSにメモリ確保を要求する)。OSは、このメモリ確保要求に応じて、要求された容量の物理メモリを確保する。即ち、OSは、図3で説明したように、要求された容量の物理メモリの空き領域を仮想メモリ上の領域(標準メモリ管理テーブル51作成時に予約した領域内の領域)にマッピングして(物理メモリの空き領域と仮想メモリの領域に関連付ける情報をアドレステーブルにセットして)、物理メモリの領域が割り当てられた仮想メモリの領域の先頭アドレスをメモリ管理機構50に返す。メモリ管理機構50は、OSから応答された仮想メモリの先頭メモリアドレスから確保したメモリ量分だけ「未使用」フラグをメモリ管理機構50の状態53にセットして、S604へ処理を進める。このS603の処理により、メモリ管理機構50は、標準メモリ管理テーブル51作成時に予約した領域内の各メモリ管理番号に対応する領域が、メモリ確保済みの領域か、メモリ未確保の領域であるか管理し、これ以後、確保済みの領域をアプリケーション44に迅速に割り当てることが可能となる。
In S603, the
一方、上記S601において、メモリ確保要求が2回目以降である(メモリ確保済み)と判定した場合には、メモリ管理機構50は、必要なメモリがメモリ管理機構50により確保した空きメモリとして存在するかどうかを調べるために、S604へ処理を進める。
On the other hand, if it is determined in S601 that the memory allocation request is the second or later (memory allocation has been completed), the
S604では、メモリ管理機構50は、現在、アプリケーション44から要求されているメモリ量がメモリ管理機構50の標準メモリ管理テーブル51で「未使用」とされている領域に存在するかどうかを判定する。そして、S604において、要求されているメモリ量が標準メモリ管理テーブル51に空きメモリとして存在すると判定した場合には、メモリ管理機構50は、アプリケーションで使用可能な状態にするために、S606(割当処理)へ処理を進める。
In S <b> 604, the
S606では、メモリ管理機構50は、アプリケーション44に要求されたメモリ量がメモリ管理機構50上に空きメモリとして存在していることが分かっているので、要求サイズ分の「未使用」フラグが付いているメモリ領域を検索し、その先頭アドレスをアプリケーション44に使用可能なメモリ領域として通知する(割り当てる)。また、メモリ管理機構50は、次のメモリ確保要求があった時に使用中のメモリ領域を使用可能だと返さないために先頭アドレスから要求分だけメモリを使用中であることを記憶しておくために、S607へ処理を進める。このS606の通知を受けたアプリケーション44は、通知された先頭アドレスから要求した分だけのメモリを使用することが可能となる。
In S606, the
次に、S607では、メモリ管理機構50は、アプリケーション44に使用可能なメモリ領域として先頭アドレスから要求サイズ分だけメモリ管理機構50の標準メモリ管理テーブル51のメモリ状態を「使用中」と記憶しておく処理を行い(ただし先頭アドレスは「先頭」と記憶しておく)、処理を終了する。このS607の処理により、メモリ管理機構50は、上記メモリ確保済みのメモリ領域内のアプリケーション44に割り当て済みのメモリ領域(使用領域)を確実に管理し、アプリケーション44へのメモリ割り当てを速やかに行うことができる。なお、先頭アドレスは、今回確保されたメモリ容量を状態と一緒に記憶し、上記S604で空き領域を探す検索処理実行時に参照するようにしてもよい。
In step S <b> 607, the
一方、S604において、要求されているメモリ量が標準メモリ管理テーブル51に空きメモリとして存在しないと判定した場合には、メモリ管理機構50は、メモリ不足をアプリケーション44に通知するために、S605へ処理を進める。
On the other hand, if it is determined in S604 that the requested memory amount does not exist as free memory in the standard memory management table 51, the
S605では、メモリ管理機構50は、処理全体で必要とされているメモリ量が物理メモリ上に空きメモリとして存在していないか、アプリケーション44から要求されているメモリ量分だけメモリ管理機構50が確保したメモリ領域に「未使用」状態(空きメモリ領域)が存在していないため、アプリケーション44にメモリ不足であることを、エラーを返すことで通知し、処理を終了する。このS605の処理により、確保したメモリ領域内に、アプリケーションで必要とされる空きメモリ量が存在しない場合には、アプリケーション44を待たせることなく、速やかにエラー処理を行うことができる。
以上のメモリ確保シーケンス処理により、メモリ管理機構50は、アプリケーション44を待たせることなく、速やかにアプリケーションから要求された容量のメモリをアプリケーション44に割り当てることができる。即ち、アプリケーション44は、要求した容量のメモリを速やかに取得して、処理を続行することができ、無駄な待機時間を抑え、パフォーマンスの低下を抑えることができる。
なお、アプリケーションプログラム44は、プログラムの終了時に、割り当てられた領域の全てを返却するためのメモリ解放要求を出力するように構成してもよい。
In step S <b> 605, the
Through the above memory allocation sequence process, the
The
図7は、本発明の実施例1に係る画像読取装置のメモリ解放シーケンス処理(メモリ管理機構50のメモリ解放処理)を示したフローチャートである。図中、S701〜S705は各ステップを示す。なお、このフローチャートの処理は、制御部32内のCPUが記録媒体33にコンピュータ読み取り可能に記録されたプログラムを読み出して実行することにより実現される。また、このメモリ解放処理は、アプリケーション44からメモリ管理機構50に先頭アドレスを指定した解放指示(メモリ解放要求)があった時にメモリ管理機構50で実行される。
FIG. 7 is a flowchart showing a memory release sequence process (memory release process of the memory management mechanism 50) of the image reading apparatus according to the first embodiment of the present invention. In the figure, S701 to S705 indicate each step. Note that the processing in this flowchart is realized by the CPU in the
S701において、メモリ管理機構50(制御部32内のCPU)は、今回のメモリ解放要求で指定された先頭アドレスが図6のメモリ確保シーケンス処理で確保された仮想メモリの先頭アドレスかどうかを判定する。具体的には、標準メモリ管理テーブル51のメモリ管理番号52に対応したメモリアドレスかどうかを判定することになる。
In S701, the memory management mechanism 50 (the CPU in the control unit 32) determines whether or not the start address specified in the current memory release request is the start address of the virtual memory reserved in the memory reservation sequence process of FIG. . Specifically, it is determined whether or not the memory address corresponds to the
そして、S701において、メモリ解放要求で指定された先頭アドレスが図6のメモリ確保シーケンス処理で確保された仮想メモリの先頭アドレスでないと判定した場合、メモリ管理機構50は、メモリ管理機構50で確保されたメモリではないので処理を終了する。例えば、標準メモリ管理テーブル51のメモリ管理番号2番や3番や6番などが指定された場合は、メモリ状態が「先頭アドレス」では無いので処理を終了する条件となる。
If it is determined in S701 that the head address specified by the memory release request is not the head address of the virtual memory secured by the memory securing sequence process of FIG. 6, the
一方、S701において、メモリ解放要求で指定された先頭アドレスが図6のメモリ確保シーケンスで確保された仮想メモリの先頭アドレスであると判定した場合、メモリ管理機構50は、未使用状態にリセットするために、S702(割当解除処理)へ処理を進める。
On the other hand, if it is determined in S701 that the head address specified in the memory release request is the head address of the virtual memory secured in the memory securing sequence of FIG. 6, the
S702では、メモリ管理機構50は、先頭アドレスから次の先頭アドレスまで、もしくは次の未使用のアドレスまで未使用状態に変更する。即ち、メモリ管理機構50は、アプリケーション44から解放要求された領域に対する、アプリケーション44へのメモリの割り当てを解除して、該領域をアプリケーション44に再割当可能にする。例えば標準メモリ管理テーブル51におけるメモリ管理番号1番が指定された場合は、メモリ管理番号1番から3番までのメモリ状態を「未使用」に変更する。また、メモリ管理番号4番が指定された場合は、メモリ管理番号4番のみを「未使用」に変更する。このS702の処理により、アプリケーション44からメモリ解放要求(返却)されたメモリ領域の割り当てを解除して再度アプリケーション44に割り当て可能にする(アプリケーション44からのメモリ返却を処理する)ことができる。
In S702, the
次に、S703において、メモリ管理機構50は、使用中のメモリがメモリ管理機構50上に存在する(即ち、S702で「未使用」フラグをセットしたアドレスに対応するメモリが最後の使用中メモリ)かどうかを判定する。そして、S703において、使用中のメモリがメモリ管理機構50上に存在すると判定した場合、メモリ管理機構50は、解放処理を終了する。なお、本実施例において使用中のメモリが存在するかどうかを調べる処理は、標準メモリ管理テーブル51のメモリ管理番号52を1から順番に検索し、テーブルの最後の番号まで先頭アドレス状態になっているかどうかを調べることによって実現されるものとする。
Next, in S703, the
一方、S703において、使用中のメモリがメモリ管理機構50上に存在しないと判定した場合、メモリ管理機構50は、メモリ管理機構50で確保したメモリ(図6のS603で確保したメモリ)を解放するために、S704へ処理を進める。
On the other hand, if it is determined in S703 that the memory in use does not exist on the
S704では、メモリ管理機構50は、図6のS603で確保されたメモリ分が仮想メモリ上にマッピングされている物理メモリを解放する処理を行う。図5の例では、メモリ管理番号1から49152までの領域をOSの仮想メモリのマッピングから解放する。メモリ管理機構50は、図6のS603で確保されたメモリのメモリ解放要求をOSに行う(Windows(登録商標)の場合、例えばVirtualFree APIを用いてOSにメモリ解放を要求する)。OSは、この要求に応じて、要求された領域をOSの仮想メモリのマッピングから解放する。即ち、OSは、アドレステーブルから、物理メモリの領域を仮想メモリの領域に関連付ける情報を削除して、該当する物理メモリの領域を再度、仮想メモリに割り当て可能にする。このS705の処理により、確保した領域を全て解放して、任意のプログラムが使用可能な状態とすることができる。
In S704, the
上記S704で仮想メモリを解放したので、次のメモリ確保要求をアプリケーション44から受けた時に最初のメモリ確保とみなす必要がある。そこで、S705において、メモリ管理機構50は、標準メモリ管理テーブル51の全てのメモリ管理番号52のメモリ状態53を「未確保」状態に変更する処理を行い、処理を終了する。このS705の処理により、メモリ管理機構50は、標準メモリ管理テーブル51作成時に予約した領域内の各メモリ管理番号に対応する領域が、メモリ未確保の領域であることを確実に管理し、再度、アプリケーション44からメモリ確保要求を受けた際には、再度、OSにメモリ確保要求を行って、メモリ確保することができる。
Since the virtual memory is released in S704, it is necessary to consider the first memory reservation when the next memory reservation request is received from the
以上のメモリ解放シーケンス処理により、メモリ管理機構50は、アプリケーション44を待たせることなく、速やかにアプリケーションから要求された領域のメモリを再割り当て可能な領域とすることができる(返却処理できる)。即ち、アプリケーション44は、必要なくなったメモリを速やかに返却して、処理を続行することができ、無駄な待機時間を抑え、パフォーマンスの低下を抑えることができる。
Through the memory release sequence process described above, the
なお、複数のアプリケーションからのメモリ確保要求がメモリ管理機構50にあった場合、即ち、例えば、ワークフローを想定して画像等の直接データを扱うアプリケーションからデータベースなどが扱うデータを管理するアプリケーションにリレーされるような場合(スキャナ等の制御に用いる専用アプリケーションと各種データベース用等の汎用アプリケーションとの連携等の場合)には、最初のアプリケーションで確保したメモリを次のアプリケーションに受け渡す仕組みをメモリ管理機構において提供するようにしてもよい。
When there is a memory allocation request from a plurality of applications in the
例えば、最初のアプリケーションが終了する前に、メモリ管理機構50で確保したメモリ領域をリレーしたいアプリケーションプロセスのメモリ管理機構50にコピーして再マッピングしてから、最初のアプリケーションのプロセスが終了するなどの処理を行う。具体的には、上述のVirtualAlloc等を用いて予約した仮想メモリ領域(即ち、管理テーブル501で管理している領域であり、図6のS601でメモリ確保した領域を含む)をVirtualCopy等を用いてプロセス間の仮想メモリコピーを行うことでリレーを実現する。つまり、メモリ管理機構50へのアプリケーション毎のメモリ確保要求を管理しながら、各メモリ確保要求とメモリ解放とのタイミングを考慮し、最初のアプリケーションで確保したメモリの全部又は一部を、次のアプリケーションにリレーする際に当該次のアプリケーションにメモリを割り当てるようにしてもよい。これにより、メモリを有効利用することができる。
For example, before the first application is terminated, the memory area secured by the
以上説明したとおり、本発明の情報処理装置(画像読取装置1)では、OSに頻繁にメモリ確保要求やメモリ解放要求を行うことなく、アプリケーションからの頻繁に行われるメモリ確保要求やメモリ解放要求に応えて、アプリケーションにメモリを割り当てることが可能となるため、メモリ確保要求を受けた際に物理メモリ領域の確保を行い、メモリ解放要求を受けた際に前記確保した物理メモリ領域の解放を行うOSで動作する環境において、本発明のメモリ管理機構50によりアプリケーションからのメモリ確保要求やメモリ解放要求に速やかに対応し、アプリケーションを無駄に待たせることなくなるので、アプリケーションのパフォーマンス低下を抑えることができる。したがって、処理全体のパフォーマンスを向上し、ユーザの利便性を向上することができる。特に、画像メモリの確保及び解放時にメモリ管理機構50を用いることにより、パフォーマンスを要求する画像処理中は、OSが時間のかかるメモリ確保、解放処理を行わなくなるので、処理全体のパフォーマンスを向上することができる。
As described above, in the information processing apparatus (image reading apparatus 1) according to the present invention, a memory allocation request or a memory release request that is frequently made by an application is performed without frequently making a memory allocation request or a memory release request to the OS. In response, the memory can be allocated to the application. Therefore, an OS that secures a physical memory area when a memory securing request is received and releases the secured physical memory area when a memory releasing request is received. In the environment where the application operates, the
なお、メモリ確保、解放時に圧縮処理や断片化解消処理やクリア処理などを行う高度なメモリ管理機能を有するOSで動作する情報読取装置では、OSに頻繁にメモリ確保要求やメモリ解放要求を行うことがなくなるので、メモリ確保処理、メモリ解放処理時にOSにより実行される解放時に圧縮処理や断片化解消処理やクリア処理によるパフォーマンス低下が抑えることができ、さらなる効果を期待できる。 Note that in an information reading apparatus operating on an OS having an advanced memory management function that performs compression processing, fragmentation elimination processing, clear processing, etc. at the time of memory allocation / release, the OS frequently makes memory allocation requests and memory release requests. Therefore, a decrease in performance due to compression processing, fragmentation elimination processing, and clear processing at the time of release executed by the OS during memory allocation processing and memory release processing can be suppressed, and further effects can be expected.
以下、実施例2について説明する。
図8は、本発明の実施例2におけるメモリ管理機構50のメモリ管理テーブルの一例を示した図である。
実施例2では、メモリ管理テーブルは、高速メモリ確保可能な予約メモリ領域の標準メモリ管理テーブル51と、低速ながら要求に応じてその都度メモリを確保する拡張メモリ管理テーブル81の二つが存在するものとする。拡張メモリ管理テーブル81は、本発明の拡張管理手段に対応す
Example 2 will be described below.
FIG. 8 is a diagram showing an example of the memory management table of the
In the second embodiment, there are two memory management tables: a standard memory management table 51 of a reserved memory area where high-speed memory can be secured, and an extended memory management table 81 which secures memory each time it is requested at a low speed. To do. The extended memory management table 81 corresponds to the extended management means of the present invention.
拡張メモリ管理テーブル81において、列82は、メモリ管理番号を示している。列82は、メモリ管理番号に対応するアドレスのメモリ確保状態を示している。各行がそれぞれメモリ管理番号(列82)と、メモリ確保状態(列83)との対応を示している。
In the extended memory management table 81, a
標準メモリ管理テーブル51と拡張メモリ管理テーブル81は、画像読取装置1内部でアプリケーションから最初のメモリ確保要求が成された時にRAM34上に制御部32の指示により作成され、全てのメモリ管理番号は未確保状態として初期化される。標準メモリ管理テーブル51と拡張メモリ管理テーブル81の作成方法については、実施例1で示した標準メモリ管理テーブル51の作成方法と同様であるので説明は省略する。
The standard memory management table 51 and the extended memory management table 81 are created in accordance with an instruction from the
実施例2では、標準メモリ管理テーブル51と拡張メモリ管理テーブル81はそれぞれ65536個の要素が存在し、一つの要素(メモリ管理番号ごと)あたり4KBのメモリの使用状態を記憶している。 In the second embodiment, each of the standard memory management table 51 and the extended memory management table 81 has 65536 elements, and stores a memory usage state of 4 KB per element (for each memory management number).
図9は、本発明の実施例2に係る画像読取装置のメモリ確保シーケンス処理(メモリ管理機構50のメモリ確保処理)を示したフローチャートである。図中、S601〜S607、S900〜S905は各ステップを示し、図6と同一のステップには同一のステップ番号を付してある。なお、このフローチャートの処理は、制御部32内のCPUが記録媒体33にコンピュータ読み取り可能に記録されたプログラムを読み出して実行することにより実現される。また、このメモリ確保処理は、アプリケーション44からメモリ管理機構50にメモリ確保指示(メモリ確保要求)があった時にメモリ管理機構50で実行される。
FIG. 9 is a flowchart showing a memory securing sequence process (memory securing process of the memory management mechanism 50) of the image reading apparatus according to the second embodiment of the present invention. In the figure, S601 to S607 and S900 to S905 indicate the respective steps, and the same steps as those in FIG. Note that the processing in this flowchart is realized by the CPU in the
本実施例では、図9(a)のS604において、要求されているメモリ量が標準メモリ管理テーブル51に空きメモリとして存在しないと判定した場合(S604でNoの場合)、メモリ管理機構50(制御部32内のCPU)は、エラーとすることなく、S900において、拡張メモリ確保処理(図9(b))を実行する。この場合、本実施例では、エラーにはならないが、メモリ確保処理・解放処理が本来のOSのメモリ確保処理・メモリ解放処理として行われるため、実施例1で示したメモリ管理機構50のメモリ確保処理と比較すると高速化は望めない。
In this embodiment, if it is determined in S604 of FIG. 9A that the requested memory amount does not exist as free memory in the standard memory management table 51 (No in S604), the memory management mechanism 50 (control) The CPU in the
以下、図9(b)を用いて、上記S900の拡張メモリ確保処理について説明する。
S901では、メモリ管理機構50は、アプリケーション44から要求されたメモリ量が物理メモリ上に空きメモリとして存在するかどうかを判定する。そして、S901において、アプリケーション44から要求されたメモリ量が物理メモリ上に空きメモリとして存在しないと判定した場合、メモリ管理機構50は、メモリ不足をアプリケーション44に通知するために、S903へ処理を進める。このS901の処理により、アプリケーション44で必要とされる空きメモリ量が物理メモリ上に存在する場合にのみ、OSにメモリ確保要求を行うように制御でき、確保できない容量のメモリをOSに要求してエラーとなってしまうといった無駄を回避することができる。即ち、アプリケーション44で必要とされる空きメモリ量が存在しない場合には、アプリケーション44を待たせることなく、速やかにエラー処理を行うことができる。
Hereinafter, the extended memory securing process in S900 will be described with reference to FIG.
In S901, the
S903では、メモリ管理機構50は、アプリケーション44から要求とされているメモリ量が物理メモリ上に空きメモリとして存在していないため、アプリケーション44にメモリ不足であることをエラーを返すことで通知し、処理を終了する。
In S903, the
一方、S901において、アプリケーション44から要求されたメモリ量が物理メモリ上に空きメモリとして存在すると判定した場合、メモリ管理機構50は、アプリケーション44から要求されたメモリ量を実際に確保するために、S902〜S905(拡張割当処理)へ処理を進める。
On the other hand, if it is determined in S901 that the memory amount requested by the
S902では、メモリ管理機構50は、アプリケーション44から要求されたメモリ量が物理メモリ上に空きメモリとして存在していることが分かっているので、アプリケーション44から要求されたメモリ量を実際に確保するようにOSにメモリ確保要求を行う。OSは、この要求に応じて、要求された容量の物理メモリを確保する。即ち、OSは、図3で説明したように、物理メモリの空き領域を仮想メモリ上の領域にマッピングして(物理メモリの空き領域と仮想メモリの領域に関連付ける情報をアドレステーブルにセットして)、物理メモリの領域が割り当てられた仮想メモリの領域の先頭アドレスをメモリ管理機構50に返す。そして、メモリ管理機構50は、アプリケーション44で使用可能な状態にするためにS904へ処理を進める。このS902の処理により、アプリケーション44で必要とされる空きメモリ量の物理メモリを確保することができる。
In S902, the
S904では、メモリ管理機構50は、上記S902で確保して仮想メモリ上にマッピングした先頭アドレスを(OSから応答された仮想メモリの先頭メモリアドレス)をアプリケーション44に使用可能なメモリ領域として通知する。このS902の通知を受けたアプリケーション44は、通知された先頭アドレスから要求した分だけのメモリを使用することが可能となる。また、メモリ管理機構50は、直接物理メモリを確保しているため標準メモリ管理テーブル51の一括管理されているメモリ領域とは異なるので、上記先頭アドレスから確保したメモリ量分だけ拡張メモリとして確保中であることを記憶しておくため、S905へ処理を進める。
In S904, the
S905では、メモリ管理機構50は、アプリケーション44が使用可能なメモリ領域として先頭アドレスから要求サイズ分、メモリ管理機構50の拡張メモリ管理テーブル81の状態を「拡張先頭」,「拡張確保」(メモリ管理番号1,2番のように)と記憶し(拡張確保領域として登録し)、処理を終了する。なお、拡張確保先頭アドレスに、今回確保されたメモリ容量を状態と一緒に記憶するようにしても良い。このS905の処理により、メモリ管理機構50は、拡張メモリ管理テーブル81作成時に予約した領域内の各メモリ管理番号に対応する領域が、メモリ確保してアプリケーション44に割り当てた領域か、メモリ未確保の領域であるか確実に管理し、以後、メモリ確保及びアプリケーション44へのメモリ割り当てを速やかに行うことができる。
In S905, the
以上説明したとおり、実施例2のメモリ確保シーケンス処理では、予め確保したメモリを超えるメモリ容量を要求された場合でも、アプリケーションから要求され際に要求された容量だけメモリを追加確保して、メモリ不足に陥ることなく、アプリケーションにメモリを割り当てて処理を続行することができる。また、システムに対する影響を最低限に抑えることができる。 As described above, in the memory allocation sequence processing according to the second embodiment, even when a memory capacity exceeding the memory allocated in advance is requested, additional memory is ensured by the capacity requested when requested by the application, and the memory is insufficient. Without falling into the process, memory can be allocated to the application and the process can be continued. Further, the influence on the system can be minimized.
図10は、本発明の実施例2に係る画像読取装置のメモリ解放シーケンス処理(メモリ管理機構50のメモリ確保処理)を示したフローチャートである。図中、S701〜S705、S1000〜S1003は各ステップを示し、図7と同一のステップには同一のステップ番号を付してある。なお、このフローチャートの処理は、制御部32内のCPUが記録媒体33にコンピュータ読み取り可能に記録されたプログラムを読み出して実行することにより実現される。また、このメモリ解放処理は、アプリケーション44からメモリ管理機構50へ先頭アドレスを指定して解放指示(メモリ解放要求)があった時にメモリ管理機構50で実行される。
FIG. 10 is a flowchart showing a memory release sequence process (memory securing process of the memory management mechanism 50) of the image reading apparatus according to the second embodiment of the present invention. In the figure, S701 to S705 and S1000 to S1003 indicate steps, and the same steps as those in FIG. Note that the processing in this flowchart is realized by the CPU in the
本実施例では、図10(a)のS701において、メモリ解放要求で指定された先頭アドレスが図9(a)のS606,S607で確保された仮想メモリの先頭アドレスでないと判定した場合(S701でNoの場合)、メモリ管理機構50(制御部32内のCPU)は、S1000において、拡張メモリ解放処理(図10(b))を実行する。 In this embodiment, when it is determined in S701 in FIG. 10A that the head address specified in the memory release request is not the head address of the virtual memory secured in S606 and S607 in FIG. 9A (in S701). In the case of No), the memory management mechanism 50 (CPU in the control unit 32) executes an extended memory release process (FIG. 10B) in S1000.
以下、図10(b)を用いて、上記S1000の拡張メモリ解放処理について説明する。
S1001では、メモリ管理機構50は、今回のメモリ解放要求が図9(b)のメモリ確保シーケンス処理で仮想メモリの拡張確保された先頭アドレスかどうかを判別する。具体的には拡張メモリ管理テーブル81で指定されたアドレスのメモリ状態が「拡張先頭」になっているかどうかを判別する。そして、上記S1001において、メモリ解放要求で指定された仮想メモリのアドレスが拡張確保された先頭アドレスでないと判定した場合、メモリ管理機構50は、メモリ管理機構50で確保されたメモリではないので処理を終了する。具体的には、拡張メモリ管理テーブル81のメモリ管理番号1番や3番以外が指定された場合は、拡張確保された先頭アドレスでは無いので処理を終了する条件となる。
Hereinafter, the extended memory release process of S1000 will be described with reference to FIG.
In S1001, the
一方、上記S1001において、メモリ解放要求で指定された仮想メモリのアドレスが拡張確保された先頭アドレスであると判定した場合、メモリ管理機構50は、物理メモリの解放処理を行うためにS1002(拡張解放処理)へ処理を進める。
On the other hand, if it is determined in S1001 that the address of the virtual memory specified in the memory release request is the head address that has been secured, the
S1002では、メモリ管理機構50は、拡張メモリ管理テーブル81において、拡張確保された先頭アドレス(「拡張確保」のアドレス)から次の拡張確保された先頭アドレスまで、もしくは次の「未確保」のアドレスまで検索し、その分の拡張確保された物理メモリを解放するようにOSにメモリ解放要求を行う。図8の例では、拡張メモリ管理テーブル81におけるメモリ管理番号1番が指定された場合はメモリ管理番号1番から2番までに相当するメモリをOSの仮想メモリのマッピングから解放するメモリ解放要求をOSに行う。また、3番が指定された時は3番に相当するメモリのみをOSの仮想メモリのマッピングから解放するメモリ解放要求をOSに行う。OSは、この要求に応じて、要求された領域をOSの仮想メモリのマッピングから解放する。即ち、OSは、アドレステーブルから、物理メモリの領域を仮想メモリの領域に関連付ける情報を削除して、該当する物理メモリの領域を再度、仮想メモリに割り当て可能にする。このS1002の処理により、アプリケーション44から返却された拡張メモリ領域を解放し、任意のプログラムが使用可能な状態とすることができる。
In S1002, the
次に、S1003において、メモリ管理機構50は、上記S1002の処理で解放されたメモリ管理番号に相当するアドレスは物理メモリを解放済みなので、上記S1002の処理で解放されたメモリ管理番号に相当するアドレスの拡張メモリ管理テーブル81のメモリ状態83を「未確保」状態に変更する処理を行い(未確保領域として登録し)、処理を終了する。このS1003の処理により、メモリ管理機構50は、上記S1002で解放したメモリ領域を、再度、メモリ確保することが可能となる。
以上のように、実施例2のメモリ解放シーケンス処理では、実施例2のメモリ確保シーケンス処理で追加確保したメモリを、アプリケーションからメモリ解放された際に解放して、任意のプログラムが使用可能にして、システムがメモリ不足に陥ってしまうことを抑えることができる。
Next, in S1003, since the
As described above, in the memory release sequence process according to the second embodiment, the memory additionally reserved in the memory reservation sequence process according to the second embodiment is released when the memory is released from the application so that an arbitrary program can be used. The system can be prevented from running out of memory.
以上説明したとおり、本発明の実施例2の画像読取装置では、予め確保した予約メモリを超えるメモリ容量を要求された場合でも、メモリ不足に陥ることなく、アプリケーションにメモリを割り当てて処理を続行できるため、システムの使い勝手を向上することができる。 As described above, in the image reading apparatus according to the second embodiment of the present invention, even when a memory capacity exceeding the reserved memory reserved in advance is requested, the process can be continued by allocating memory to the application without falling short of memory. Therefore, the usability of the system can be improved.
(他の実施例1)
本発明の情報処理装置は、スマートフォン、携帯電話、各種タブレット型コンピュータ等を含む携帯端末であってもよい。
(Other Example 1)
The information processing apparatus of the present invention may be a mobile terminal including a smartphone, a mobile phone, various tablet computers, and the like.
本発明の携帯端末は、図2に示した情報処理装置と同様に、制御部、RAM、記録媒体、通信部、表示部等を有し、制御部が、通信部により受信したウェブページをRAM(物理メモリ)を用いて表示部に表示処理するウェブ表示アプリケーション(ウェブブラウザ)を実行可能である。なお、ウェブページとは、htmlやxmlなどを始めとしたタグマークアップ言語(構造化言語)を用いて動画、画像、文章などを表示するためのデータやjava(登録商標)スクリプト等のユーザ入力によってその表示内容を変化させるためのプログラムを含むものであり(即ち、構造化言語を用いて表現されたデータであり)、ウェブブラウザ等のアプリケーションにより表示可能である。ウェブページは、マークアップ言語によって階層化されているために解析が終了するまでデータの容量が不定である。 Similar to the information processing apparatus shown in FIG. 2, the portable terminal of the present invention has a control unit, a RAM, a recording medium, a communication unit, a display unit, and the like, and the control unit stores the web page received by the communication unit in the RAM. A web display application (web browser) that performs display processing on the display unit using (physical memory) can be executed. A web page refers to user input such as data for displaying moving images, images, text, etc. using a tag markup language (structured language) such as html or xml, or a Java (registered trademark) script. Includes a program for changing the display content (that is, data expressed using a structured language) and can be displayed by an application such as a web browser. Since the web page is hierarchized by the markup language, the data capacity is undefined until the analysis is completed.
また、カメラ等の撮像部を有し、撮像部により撮像処理を実行させて撮像部から取得された画像データの画像処理を行う画像処理アプリケーションを実行可能に構成してもよい。また、通信部から取得された画像データの画像処理を行う画像処理アプリケーションを実行可能に構成してもよい。上記携帯端末と外部装置としてのスキャナを(有線又は無線で)通信可能に接続して、スキャナから画像データを取得して画像処理を行う画像処理アプリケーションを実行可能に構成してもよい。さらに、上記携帯端末と外部装置としてのプリンタを(有線又は無線で)通信可能に接続して、RAM又は記録媒体に格納される画像データを画像処理してプリンタで印刷させる画像処理アプリケーションを実行可能に構成してもよい。 In addition, an image processing application that includes an image capturing unit such as a camera and performs image processing of image data acquired from the image capturing unit by causing the image capturing unit to perform image capturing processing may be configured to be executable. Further, an image processing application that performs image processing of image data acquired from the communication unit may be configured to be executable. The portable terminal and a scanner as an external device may be connected so as to be communicable (wired or wirelessly), and an image processing application that acquires image data from the scanner and performs image processing may be configured to be executable. Furthermore, the portable terminal and a printer as an external device can be communicably connected (wired or wirelessly) to execute an image processing application that performs image processing on image data stored in a RAM or a recording medium and prints the image on the printer. You may comprise.
また、本発明の携帯端末は、メモリ確保要求を受けた際に物理メモリ領域の確保を行い、メモリ解放要求を受けた際に前記確保した物理メモリ領域の解放を行うオペレーティングシステムで動作する。さらに、本発明の携帯端末は、上述した実施例1、実施例2に示したメモリ管理機構を有する。また、本発明の携帯端末で動作する上記ウェブ表示アプリケーションは、ウェブページの表示処理を行うためのメモリの確保及び解放時に、メモリ管理機構50を用いるものとする。なお、このアプリケーションは、ウェブページの表示処理を行うためのメモリの確保・解放か、それ以外のメモリ確保・解放かを区別できる構成となっている。このアプリケーションの場合、メモリ管理機構50がアプリケーションからの最初のメモリ要求の際に一括してメモリ確保するメモリ確保量は、OSに一度に要求可能な最大メモリ容量からシステム使用容量(上記予め確保するメモリ以外に、携帯端末の制御部(CPU)が使用する必要最低限の容量)を差し引いたメモリ量としてもよい。
The portable terminal of the present invention operates in an operating system that secures a physical memory area when a memory securing request is received and releases the secured physical memory area when a memory release request is received. Furthermore, the portable terminal of the present invention has the memory management mechanism shown in the first and second embodiments. The web display application that operates on the portable terminal of the present invention uses the
同様に、上記画像処理アプリケーションは、画像メモリの確保・解放かそれ以外のメモリ確保・解放かを区別できる構成であり、画像メモリの確保及び解放時にメモリ管理機構50を用いるものとする。この画像処理アプリケーションの場合、メモリ管理機構50がアプリケーションからの最初のメモリ要求の際に一括してメモリ確保するメモリ確保量は、カメラやスキャナが一度の読み取り処理で読み取る画像データのサイズに、アプリケーションでの画像処理単位(例えば、スキャンの場合は原稿片面、カメラの場合は1フレーム、プリントの場合は1ページ)の画像データのサイズを、加算したサイズに対応するメモリ量としてもよい。つまり、原稿の画像読み取り処理であれば、アプリケーションによる画像処理能力に応じて、例えば、数ページ分、原稿の枚数分に相当する所定容量のメモリ量をメモリ確保量とすることができる。
Similarly, the image processing application is configured to be able to distinguish whether the image memory is secured / released or other memory secured / released, and the
このような構成を有することにより、必ずしも物理メモリが潤沢に存在しない携帯端末であっても、容量が不定なウェブページの表示や画像処理を行う等の使用するメモリ容量の大きくなる可能性のあるアプリケーションが、上述のようなOSで動作する携帯端末で実行された場合でも、アプリケーションからのメモリ確保要求やメモリ解放要求に速やかに対応し、アプリケーションを無駄に待たせることなくなるので、アプリケーションのパフォーマンスの低下を抑えることができる。 By having such a configuration, even a mobile terminal that does not necessarily have abundant physical memory may increase the memory capacity to be used, such as displaying web pages or performing image processing with an undefined capacity. Even when an application is executed on a portable terminal operating on the OS as described above, it can quickly respond to a memory securing request or a memory releasing request from the application, and the application does not have to wait unnecessarily. The decrease can be suppressed.
本発明では、メモリ確保・解放要求を受けた時点で物理メモリ領域の確保・解放を行うOSや、メモリ確保・解放要求を受けた際に使用中のメモリ領域の圧縮処理や断片化解消処理やクリア処理などを行う高度なメモリ管理機能を有するOSのように、メモリの確保処理と解放処理が比較的遅いOSで動作する情報処理装置にて、OSに対するメモリの確保要求と解放要求の回数を減らして、アプリケーションのパフォーマンスの低下を抑える。特に、パフォーマンスが要求される処理中では、OSに対するメモリの確保要求と解放要求は行わないように構成する。 In the present invention, an OS that secures / releases a physical memory area when a memory securing / release request is received, a compression process or a fragmentation elimination process for a memory area that is in use when a memory securing / release request is received, The number of memory allocation requests and release requests to the OS is determined in an information processing apparatus that operates on an OS with relatively slow memory allocation and release processing, such as an OS having an advanced memory management function that performs clear processing and the like. To reduce application performance degradation. In particular, during processing that requires performance, it is configured not to make a memory allocation request and a release request to the OS.
具体的にはパフォーマンスが要求される処理が開始される前に高速に処理したい処理分のメモリ容量を予め確保しておき、処理中はOSに対してメモリ確保要求や、メモリ解放要求は行わないようにする。そして、その処理が終了したら、処理前に確保したメモリを解放するようにする。また、システムや他のアプリケーションでもメモリは使用されるため、全ての物理メモリを高速な画像処理用に割り当てることは難しいため、予め確保した領域を超える容量のメモリの確保については、その時点でOSに対してメモリ確保要求、メモリ解放要求を随時行い、メモリ不足に陥らないように構成する。 Specifically, a memory capacity for processing to be processed at a high speed is secured in advance before processing requiring performance is started, and no memory allocation request or memory release request is issued to the OS during the processing. Like that. When the process is completed, the memory secured before the process is released. Also, since memory is used in the system and other applications, it is difficult to allocate all physical memory for high-speed image processing. In order to prevent a memory shortage, a memory securing request and a memory releasing request are made at any time.
以上の構成により、OSがメモリ確保・解放を行う回数を減らし、本発明のメモリ管理機構50によりアプリケーションからのメモリ確保要求やメモリ解放要求に速やかに対応し、アプリケーションを無駄に待たせないことで、アプリケーションのパフォーマンス低下を抑えることができる。また、予め確保した予約メモリを超えるメモリ容量を要求された場合でも、アプリケーションから要求され際に要求された容量だけメモリを追加確保して、メモリ不足に陥ることなく、アプリケーションにメモリを割り当てて処理を続行することが可能となる。また、システムに対する影響を最低限に抑えることができる。
With the above configuration, the number of times the OS performs memory allocation / release is reduced, the
なお、上述した各種データの構成及びその内容はこれに限定されるものではなく、用途や目的に応じて、様々な構成や内容で構成されることは言うまでもない。 It should be noted that the configuration and contents of the various data described above are not limited to this, and it goes without saying that the various data and configurations are configured according to the application and purpose.
以上、一実施例について示したが、本発明は、例えば、システム、装置、方法、プログラムもしくは記憶媒体等としての実施態様をとることが可能であり、具体的には、複数の機器から構成されるシステムに適用しても良いし、また、一つの機器からなる装置に適用しても良い。 Although one embodiment has been described above, the present invention can take the form of, for example, a system, apparatus, method, program, or storage medium, and specifically includes a plurality of devices. The present invention may be applied to a system including a single device.
(他の実施例2)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
また、本発明は、複数の機器から構成されるシステムに適用しても、1つの機器からなる装置に適用してもよい。
(Other Example 2)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.
Further, the present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device.
本発明は上記実施例に限定されるものではなく、本発明の趣旨に基づき種々の変形(各実施例の有機的な組合せを含む)が可能であり、それらを本発明の範囲から除外するものではない。即ち、上述した各実施例及びその変形例を組み合わせた構成も全て本発明に含まれるものである。 The present invention is not limited to the above embodiments, and various modifications (including organic combinations of the embodiments) are possible based on the spirit of the present invention, and these are excluded from the scope of the present invention. is not. That is, the present invention includes all the combinations of the above-described embodiments and modifications thereof.
本発明の情報処理装置を、メモリ確保・解放要求を受けた時点で物理メモリ領域の確保・解放を行うOSや、メモリ確保・解放要求を受けた際に使用中のメモリ領域の圧縮処理や断片化解消処理やクリア処理などを行う高度なメモリ管理機能を有するOSのみでなく、メモリの確保処理と解放処理が比較的遅いOSで動作する情報処理装置に適用することで効果を期待できる。 The information processing apparatus according to the present invention includes an OS that secures / releases a physical memory area when a memory allocation / release request is received, and a compression process or fragment of a memory area that is in use when a memory allocation / release request is received The effect can be expected by applying it not only to an OS having an advanced memory management function for performing de-serialization processing, clear processing, etc., but also to an information processing apparatus that operates on an OS with relatively slow memory securing and releasing processes.
1 情報処理装置(画像読取装置)
21 情報表示部
31 画像読取部
32 制御部
33 記憶媒体
34 RAM
35 外部通信インタフェース(外部通信I/F)
50 メモリ管理機構
51 標準メモリ管理テーブル
81 拡張メモリ管理テーブル
1. Information processing device (image reading device)
21
35 External communication interface (external communication I / F)
50
Claims (25)
アプリケーションプログラムからの最初のメモリ確保要求に応じて、前記オペレーティングシステムに対して所定容量のメモリ確保要求を行って、前記所定容量のメモリ領域を確保する確保手段と、
前記アプリケーションプログラムからのメモリ確保要求に応じて、前記確保手段で確保したメモリ領域内の前記アプリケーションプログラムへ割り当てていない状態の領域を、前記アプリケーションプログラムに対して割り当てる割当手段と、
を有することを特徴とする情報処理装置。 An information processing apparatus operating in an operating system that secures a physical memory area when receiving a memory securing request and releases the secured physical memory area when receiving a memory release request,
In accordance with an initial memory securing request from the application program, a securing unit that performs a memory securing request with a predetermined capacity to the operating system and secures the memory area with the predetermined capacity;
An allocating unit that allocates, to the application program, an area that is not allocated to the application program in the memory area secured by the securing unit in response to a memory securing request from the application program;
An information processing apparatus comprising:
前記確保手段は、前記確保したメモリ領域内の全領域を、前記アプリケーションプログラムへ割り当てられていない状態の領域を示す未使用領域として前記管理手段に登録し、
前記割当手段は、前記アプリケーションプログラムへ割り当てた領域を、前記アプリケーションプログラムへ割り当てられている状態の領域を示す使用領域として前記管理手段に登録し、
前記割当解除手段は、前記アプリケーションへの割り当てを解除した領域を、前記未使用領域として前記管理手段に登録することを特徴とする請求項3乃至5のいずれか1項に記載の情報処理装置。 Management means for storing and managing the allocation state of each area in the memory area secured by the securing means to the application program;
The securing means registers all areas in the secured memory area in the management means as unused areas indicating areas not allocated to the application program,
The assigning means registers the area assigned to the application program in the managing means as a use area indicating an area assigned to the application program,
The information processing apparatus according to any one of claims 3 to 5, wherein the deallocation unit registers an area that has been unassigned to the application as the unused area in the management unit.
前記割当手段は、前記拡張割当処理で確保した領域を、拡張確保領域として前記拡張管理手段に登録し、
前記割当解除手段は、前記拡張解放処理で解放した領域を、未確保領域として前記拡張管理手段に登録することを特徴とする請求項8に記載の情報処理装置。 Extended management means for storing and managing a secured state of a memory area that can be newly secured by the extended allocation process;
The allocating means registers the area secured by the extended allocation process as an expanded secured area in the extended management means,
9. The information processing apparatus according to claim 8, wherein the deallocation unit registers the area released by the extension release process in the extension management unit as an unsecured area.
前記アプリケーションプログラムは、前記画像読取手段により取得される画像データを前記物理メモリに格納して処理することを特徴とする請求項1乃至11のいずれか1項に記載の情報処理装置。 Having image reading means for reading image and acquiring image data;
The information processing apparatus according to claim 1, wherein the application program stores and processes image data acquired by the image reading unit in the physical memory.
前記アプリケーションプログラムは、前記通信手段により受信した構造化言語を用いて表現されたデータを前記物理メモリを用いて前記表示手段に表示処理することを特徴とする請求項17に記載の情報処理装置。 The information processing apparatus includes a communication unit and a display unit,
The information processing apparatus according to claim 17, wherein the application program displays the data expressed using the structured language received by the communication unit on the display unit using the physical memory.
画像を読み取って画像データを出力する画像読取手段と、
前記画像読取手段から出力される画像データを前記物理メモリに格納して処理するアプリケーションと、
前記アプリケーションからの最初のメモリ確保要求に応じて、前記オペレーティングシステムに対して所定容量のメモリ確保要求を行って、前記所定容量のメモリ領域を確保する確保手段と、
前記アプリケーションからのメモリ確保要求に応じて、前記確保手段で確保したメモリ領域内の前記アプリケーションへ割り当てていない状態の領域を、前記アプリケーションに対して割り当てる割当手段と、
を有することを特徴とする画像読取装置。 An image reading apparatus that operates in an operating system that secures a physical memory area when receiving a memory securing request and releases the secured physical memory area when receiving a memory release request,
Image reading means for reading an image and outputting image data;
An application for storing and processing image data output from the image reading means in the physical memory;
In accordance with an initial memory securing request from the application, a securing unit that performs a memory securing request with a predetermined capacity to the operating system and secures the memory area with the predetermined capacity;
In response to a memory securing request from the application, an allocating unit that allocates, to the application, an area that has not been allocated to the application in the memory area secured by the securing unit;
An image reading apparatus comprising:
前記アプリケーションからの最初のメモリ確保要求に応じて、前記オペレーティングシステムに対して所定容量のメモリ確保要求を行って、前記所定容量のメモリ領域を確保する確保手段と、
前記アプリケーションからのメモリ確保要求に応じて、前記確保手段で確保したメモリ領域内の前記アプリケーションへ割り当てていない状態の領域を、前記アプリケーションに対して割り当てる割当手段と、
を有することを特徴とする携帯端末。 Having a communication means and a display means, securing a physical memory area when receiving a memory securing request, and operating in an operating system for releasing the secured physical memory area when receiving a memory releasing request; A portable terminal capable of executing an application for displaying data expressed using a structured language received by the communication unit on the display unit using the physical memory,
In accordance with an initial memory securing request from the application, a securing unit that performs a memory securing request with a predetermined capacity to the operating system and secures the memory area with the predetermined capacity;
In response to a memory securing request from the application, an allocating unit that allocates, to the application, an area that has not been allocated to the application in the memory area secured by the securing unit;
A portable terminal characterized by comprising:
前記情報処理装置に設けられたプロセッサが、アプリケーションからの最初のメモリ確保要求に応じて、前記オペレーティングシステムに対して所定容量のメモリ確保要求を行って、前記所定容量のメモリ領域を確保する確保ステップと、
前記プロセッサが、前記アプリケーションからのメモリ確保要求に応じて、前記確保ステップで確保したメモリ領域内の前記アプリケーションへ割り当てていない状態の領域を、前記アプリケーションに対して割り当てる割当ステップと、
を有することを特徴とする情報処理装置のメモリ制御方法。 A memory control method of an information processing apparatus operating in an operating system that secures a physical memory area when receiving a memory securing request and releases the secured physical memory area when receiving a memory release request,
A securing step in which a processor provided in the information processing apparatus makes a memory securing request with a predetermined capacity to the operating system in response to an initial memory securing request from an application, and secures the memory area with the predetermined capacity. When,
An allocation step in which the processor allocates, to the application, an area that is not allocated to the application in the memory area secured in the securing step in response to a memory securing request from the application;
A memory control method for an information processing apparatus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010038154A JP2011175395A (en) | 2010-02-24 | 2010-02-24 | Information processor, image reading device, portable terminal, memory control method for information processor, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010038154A JP2011175395A (en) | 2010-02-24 | 2010-02-24 | Information processor, image reading device, portable terminal, memory control method for information processor, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011175395A true JP2011175395A (en) | 2011-09-08 |
Family
ID=44688202
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010038154A Pending JP2011175395A (en) | 2010-02-24 | 2010-02-24 | Information processor, image reading device, portable terminal, memory control method for information processor, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011175395A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102681940A (en) * | 2012-05-15 | 2012-09-19 | 兰雨晴 | Method for carrying out performance test on memory management subsystem of Linux operation system |
JP2015203990A (en) * | 2014-04-14 | 2015-11-16 | 京セラドキュメントソリューションズ株式会社 | Electronic device and memory management method |
WO2015182122A1 (en) * | 2014-05-28 | 2015-12-03 | 日本電気株式会社 | Information-processing device, information-processing system, memory management method, and program-recording medium |
JP2016178611A (en) * | 2015-03-23 | 2016-10-06 | 富士ゼロックス株式会社 | Image data transmitter, program for image data transmission, and system for image data communication |
JP2018049511A (en) * | 2016-09-23 | 2018-03-29 | 富士ゼロックス株式会社 | Information processing device and program |
WO2021087662A1 (en) * | 2019-11-04 | 2021-05-14 | 深圳市欢太科技有限公司 | Memory allocation method and apparatus, terminal, and computer readable storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0644129A (en) * | 1992-07-24 | 1994-02-18 | Fuji Xerox Co Ltd | Information processor |
JP2006338503A (en) * | 2005-06-03 | 2006-12-14 | Fuji Xerox Co Ltd | Image processing device, method, and program |
-
2010
- 2010-02-24 JP JP2010038154A patent/JP2011175395A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0644129A (en) * | 1992-07-24 | 1994-02-18 | Fuji Xerox Co Ltd | Information processor |
JP2006338503A (en) * | 2005-06-03 | 2006-12-14 | Fuji Xerox Co Ltd | Image processing device, method, and program |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102681940A (en) * | 2012-05-15 | 2012-09-19 | 兰雨晴 | Method for carrying out performance test on memory management subsystem of Linux operation system |
JP2015203990A (en) * | 2014-04-14 | 2015-11-16 | 京セラドキュメントソリューションズ株式会社 | Electronic device and memory management method |
WO2015182122A1 (en) * | 2014-05-28 | 2015-12-03 | 日本電気株式会社 | Information-processing device, information-processing system, memory management method, and program-recording medium |
JPWO2015182122A1 (en) * | 2014-05-28 | 2017-04-20 | 日本電気株式会社 | Information processing apparatus, information processing system, memory management method, and memory management program |
US9940053B2 (en) | 2014-05-28 | 2018-04-10 | Nec Corporation | Information processing device, information processing system, memory management method, and program recording medium |
JP2016178611A (en) * | 2015-03-23 | 2016-10-06 | 富士ゼロックス株式会社 | Image data transmitter, program for image data transmission, and system for image data communication |
JP2018049511A (en) * | 2016-09-23 | 2018-03-29 | 富士ゼロックス株式会社 | Information processing device and program |
WO2021087662A1 (en) * | 2019-11-04 | 2021-05-14 | 深圳市欢太科技有限公司 | Memory allocation method and apparatus, terminal, and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA3104353C (en) | Storage volume creation method and apparatus, server, and storage medium | |
WO2018059079A1 (en) | Memory management method and apparatus | |
JP2011175395A (en) | Information processor, image reading device, portable terminal, memory control method for information processor, and program | |
US9507584B2 (en) | Electronic device including a memory technology device | |
JP5475307B2 (en) | Memory management method, computer readable medium and apparatus for rasterization | |
US20100251255A1 (en) | Server device, computer system, recording medium and virtual computer moving method | |
CN101847105A (en) | Computer and internal memory sharing method of a plurality of operation systems | |
JP2014235501A (en) | Control method of storage device, storage device and information processing device | |
CN109062826B (en) | Data transmission method and system | |
WO2019233326A1 (en) | Printing control method, device and system | |
JP2008009696A (en) | Image processor and program | |
CN103218305A (en) | Distribution method of memory space | |
JP5832556B2 (en) | Image processing apparatus and image forming apparatus | |
US8225068B2 (en) | Virtual real memory exportation for logical partitions | |
US9691010B2 (en) | Information processing apparatus, distributed printing system, and method of controlling printing | |
US9183473B2 (en) | Image forming apparatus having function of avoiding overflow of buffer and image forming method | |
JP2007323393A (en) | Image processor and program | |
JP7158656B2 (en) | Image forming apparatus, image forming method and image forming program | |
JP2011039790A (en) | Virtual machine image transfer device, method and program | |
JP6763236B2 (en) | Print control device, print control method, and program | |
JP5414305B2 (en) | Information processing apparatus, virtual storage management method, and program | |
JP6398963B2 (en) | Image forming apparatus and program executed by image forming apparatus | |
US20230168822A1 (en) | Memory management method and semiconductor device adjusting size of contiguous memory allocation area | |
KR102543344B1 (en) | Image processing apparatus, method for controlling the same, and computer-readable storage medium | |
JP2013178634A (en) | Electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130213 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20131028 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131126 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140127 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20140624 |