CN100360318C - Printing internal memory managing method for improving intenral memory availability - Google Patents

Printing internal memory managing method for improving intenral memory availability Download PDF

Info

Publication number
CN100360318C
CN100360318C CNB2005100050853A CN200510005085A CN100360318C CN 100360318 C CN100360318 C CN 100360318C CN B2005100050853 A CNB2005100050853 A CN B2005100050853A CN 200510005085 A CN200510005085 A CN 200510005085A CN 100360318 C CN100360318 C CN 100360318C
Authority
CN
China
Prior art keywords
memory
page
internal memory
print
section
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.)
Expired - Fee Related
Application number
CNB2005100050853A
Other languages
Chinese (zh)
Other versions
CN1644386A (en
Inventor
林兆祥
刘志红
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.)
Peking University
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University
Beijing Founder Electronics 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 Peking University, Beijing Founder Electronics Co Ltd filed Critical Peking University
Priority to CNB2005100050853A priority Critical patent/CN100360318C/en
Publication of CN1644386A publication Critical patent/CN1644386A/en
Application granted granted Critical
Publication of CN100360318C publication Critical patent/CN100360318C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention relates to a printing internal memory managing method for improving the utilization rate of internal memory, which belongs to the technical field of printing control. The existing printing control method usually distributes memory needed by pages before printing statically, which avoids the phenomenon of printing fail due to not applying memory in time, but can not sufficiently enhance the utilization rate of memory. The method of the present invention requests memory reservation before printing, and dynamically distributes the memory in the process of printing. Compared with a simple dynamic memory distribution method, the method of the present invention avoids the phenomenon that a current page has printing fail due to not having memory caused by the memory application of follow up pages. Compared with a static memory distribution, the method of the present invention can enhance the utilization rate of memory besides ensuring the real-time printing.

Description

A kind of print memory management method that can improve memory usage
Technical field
The invention belongs to printing control technical filed, be specifically related to a kind of print memory management method that can improve memory usage.
Background technology
In the prior art, the whole workflow that common grating PRN device is printed one page can be divided into three parts: at first, receive print data from main frame; Then print data is rasterized into grating lattice; At last grating lattice is sent to print engine output.
Usually, in order to reduce the quantity required of internal memory, a lot of grating PRN devices adopt following print control program:
A page is divided into plurality of sections, earlier page data is explained and become a kind of intermediate form of arranging by section, the data of this intermediate form are than being easier to be converted into final grating lattice, and the shared internal memory of the data of this intermediate form is significantly smaller than the grating lattice of the page usually, printer elder generation rasterisation just can begin to print for one section, the grating lattice that carries out next section in the process that the preceding paragraph is printed simultaneously produces in real time, can improve print speed like this, do not need very big internal memory to deposit the grating lattice of a complete page again, but, in case the weak point of this method is that a certain section data are very complicated, then printer can not in time be finished the rasterisation of this section probably in the time that the preceding paragraph is printed, then can produce the mistake of printing border-crossing (print overrun), the page can not correctly be exported.
On this basis, some improved methods have appearred again, these methods are utilized the complicated section of free time rasterisation of the simple section of processing in the print procedure, the method that in United States Patent (USP) 5129049, proposes as Hewlett-Packard, the principle of this method be if a certain section content is very simple or the content of this section in advance rasterisation finish, this section of time-write interval rasterisation that does not need a section when then this section printed, free time wherein then can be used for rasterisation next the section, like this, the rasterisation time that might next section can not need rasterisation in advance greater than one period time-write interval, so this method can reduce the number of rasterizating section in advance to a certain extent.
Above-mentioned these methods need be used internal memory in the process of printing, if will cause misprint because of Out of Memory makes the application failure, so be not suitable for adopting simple dynamic assignment in the print procedure.Usually use static memory to distribute, static memory has been assigned as each page static allocation buffer memory of some, the buffer memory of this page offers the next page and uses when page print is finished.Because based on needing many internal memories at first in printing usually in the Method of printing of segmentation, the demand to internal memory in the print procedure can reduce gradually, therefore this method does not fully improve the utilization rate of internal memory.On the other hand, in order to improve print speed, need the next page of parallel processing usually when printing a page, in order to reach this purpose, print system needs to provide at least two pages to handle needed internal memory.
Summary of the invention
At the defective that exists in the prior art, the purpose of this invention is to provide a kind of more advanced print memory management method that can improve the print memory utilization rate, this method can improve the utilization rate of internal memory when guaranteeing correct the printing.
For reaching above purpose, the technical solution used in the present invention is: a kind of print memory management method that can improve the print memory utilization rate may further comprise the steps:
A. the timestamp of all free memories of initialization is 0 during the print system initialization; The memory management pattern is set to shared model, for each page that will print, starts a task, handles following steps B to step I;
B. accept timestamp of page generation of data for current preparation, if the pattern of internal memory is not a shared model, hangs up the pattern of waiting for up to internal memory and become shared model, memorymodel is set to exclusive occupying mode then;
C. PRN device receives the page print data by interface from main frame;
D. according to page-size, parameters such as print speed are determined the number of every page of section of being divided, and determine to deposit the needed memory size UnitSize of data with rasterized of a section of this page, and the section buffer size that writes down this page also is UnitSize;
E. apply for that internal memory is used to deposit page intermediate form data, print data is construed to the data of the intermediate form of forming by section;
F. determine the beginning rasterisation moment of each section;
G. determine each section printing zero hour in order to guarantee to print the quantity Bmax that carries out required buffer memory smoothly;
H. asking memory management unit is the quantity Bmax that current page keeps buffer memory required when beginning to print first section, and memorymodel is set to shared model;
I. apply for that internal memory is used to deposit data with rasterized, and rasterisation needs the section of pre-rasterisation, then, the beginning printer page, start the task of rasterisation simultaneously, the rasterisation task is according to the beginning rasterisation moment of each section of determining in the step F, the application size is used to deposit rasterization result for the internal memory of UnitSize, then rasterisation is corresponding section, in print procedure, every printing finishes a section, discharges the shared internal memory of data with rasterized of the section of having printed, and asking memory management unit simultaneously is the quantity Bmax that current page keeps buffer memory required when beginning to print next section;
J. after page print finishes, discharge all internal memories of this page intermediate form data occupancy, the request memory management unit is that current page keeps 0 buffer memory.
Further, for making the present invention obtain better effect, determine among the step G that each section begins to print constantly in order to guarantee to print the quantity Bmax that carries out required buffer memory smoothly, method is to calculate each section to begin to print the quantity of needed buffer memory constantly, this quantity is carved into when being meant from this section printing prints the maximum quantity that is used for the memory block of buffer memory data with rasterized the process that finishes, and concrete steps are as follows:
(1) final stage that the page is set is a processing section, and the buffer memory quantity MaxBufferCount that the page is set to be needed is 0;
(2) computing section begin to print constantly rasterisation but also not have to print finish section quantity, and be recorded as BufferCount;
(3) the buffer memory quantity Bmax of set handling section correspondence is BufferCount, MaxBufferCount bigger number among both;
(4) the buffer memory quantity MaxBufferCount that the page is set needs is the Bmax of processing section correspondence;
(5) if processing section is not first section of this page, change step (2) as processing section the last period of putting processing section.
Further, for making the present invention obtain better effect, the request memory management unit is the current page reserved memory among step H, the step I, the information that provides during request is to need the quantity of reserved memory to ask to keep quantity and propose the page current page that internal memory keeps, and concrete computational methods may further comprise the steps:
(1) if current page does not have the internal memory reservation record, then continue, otherwise, change step (3) over to;
(2) the free memory quantity of calculating current page, if the free memory quantity of current page keeps quantity greater than the request of this page, the internal memory that writes down this page so keeps quantity and keeps quantity for request, it is the internal memory reservation quantity of this page that the internal memory of this page of initialization simultaneously needs quantity, otherwise, directly return mistake, finish;
(3) if it is 0 that request keeps quantity, then delete the internal memory reservation record of current page, change step (5) over to, otherwise the reservation quantity of renewal current page keeps quantity for request;
(4) internal memory from this page needs to deduct the quantity difference that original internal memory keeps quantity and request reservation quantity;
(5) if current have task because request is suspended less than internal memory, wake these tasks up.
Further, obtain better effect, discharge internal memory among step J and the step I, the start address information of the memory block that discharge need be provided when discharging internal memory, specifically may further comprise the steps for making the present invention:
(1) memory block that will discharge according to the start address information searching of memory block if processing block is not monopolized mark, needs quantity to add 1 the internal memory that discharges the page of internal memory as processing block, otherwise, the cancellation memory block monopolize mark;
(2) memory block that will discharge is labeled as the free time, and promptly the timestamp of the memory block that will discharge changes to 0;
(3) merge adjacent free memory block,, then they are merged into a big memory block if the existence timestamp adjacent with this memory block is 0 memory block;
(4) if hanging up because of the application internal memory of task is arranged, activate these tasks.
Further, obtain better effect for making the present invention, step e is page application internal memory among the step I, and the information that need provide during the application internal memory is the page that proposes the internal memory application and the size that will apply for internal memory, may further comprise the steps:
(1) if the internal memory reservation record of the page that proposes the internal memory application is arranged, and the size of application internal memory and not of uniform size the causing of this page section buffering area, mistake returned so;
(2) search a big free memory block of internal memory than application;
(3) if do not find qualified memory block, then hang up and wait for, change step (2) over to and restart to search, otherwise, the memory block that current free memory block equals to find is set, continue to enter next step;
Whether (4) check can be from storage allocation in the current free memory block, if cannot, then search other and also be not examined and, change step (3) over to than the big free memory block of internal memory of application, otherwise, next step entered;
(5) current free memory block is divided into two, first initial address wherein from original memory block, size is the memory size of application, and first timestamp is designated the timestamp of application memory pages; Second second timestamp is 0 in order to remove first remainder, if its size is 0, then deletes this memory block information;
(6) if this page is not applied for internal memory to be kept, then the internal memory of first memory block of mark is masked as and monopolizes sign, changes step (8) over to;
(7) if this page has been applied for internal memory to be kept, then the internal memory from this page needs to deduct 1 the quantity;
(8) return the initial address of first memory block, this address is the memory address that will distribute.
Further, obtain better effect for making the present invention, whether in the above-mentioned steps (4), checking can be from current free memory block the inside storage allocation, and its detailed step is as follows:
1) at first, current free memory block is divided into two, first initial address wherein from current free block, size is the memory size of application, second for removing first remainder;
2) timestamp of first memory block is designated the timestamp of the page of application internal memory; The timestamp that second memory block is set is 0;
3) if the page of application internal memory has the internal memory reservation record, need quantity to deduct 1 the internal memory that needs of applying for memory pages;
4) for the page of all timestamps, calculate its free memory quantity, check that whether free memory quantity need quantity less than the internal memory of this page smaller or equal to application memory pages timestamp.If the free memory quantity that has a page needs quantity less than the internal memory of this page, the result is for distributing, otherwise the result is for distributing;
Two the memory block that 5) will be divided in step 1) reconsolidates, and its timestamp is changed to 0, if the page of application internal memory has had the internal memory reservation record, needs quantity to add 1 the internal memory of applying for memory pages.
Further, obtain better effect for making the present invention, above-mentioned steps H in the step 4), calculates the free memory quantity of a page, and memory block is arranged with start address order from small to large, and its method is as follows:
A. initialization free memory number of blocks TotalCount is 0, and initialization memory block size UnitSize is the section buffer size of this page, and initialization free memory size BufferSize is 0;
B. get first memory block as processing block;
If c. the timestamp of processing block is less than the timestamp of the page of request internal memory, then the size of BufferSize=BufferSize+ processing block changes step e then over to;
If d. the timestamp of processing block is more than or equal to the timestamp of the page of request internal memory, then upgrade free memory number of blocks TotalCount=TotalCount+floor (BufferSize/UnitSize) (please describe) with Chinese, wherein floor (x) is a function, the maximum integer that expression is littler than x, it is 0 that BufferSize is set;
If e. there be not the next memory block adjacent with processing block, upgrade free memory number of blocks TotalCount=TotalCount+floor (BufferSize/UnitSize), TotalCount is this page free memory quantity, finish, otherwise get the memory block adjacent with processing block as processing block, change step c over to the next one.
Effect of the present invention is: adopt print memory management method of the present invention, compare with simple Dram distribution, avoided because the internal memory application of subsequent page causes current page owing to there not being internal memory misprint to occur, compare with the static memory distribution, can guarantee in correct the printing, to have improved the utilization rate of internal memory.
Description of drawings
Fig. 1 is the FB(flow block) of the main treatment step of the specific embodiment of the invention;
Fig. 2 is that each section that calculates the page begins to print the amount of memory flow chart that needs constantly;
Fig. 3 is that the request memory management unit is the internal memory flow chart that a page keeps some;
Fig. 4 is an application internal memory flow chart;
Fig. 5 discharges the internal memory flow chart;
Fig. 6 is whether check can be from a free block the inside storage allocation flow chart;
Fig. 7 is the free memory quantity flow chart that calculates a page.
The specific embodiment
Below in conjunction with Figure of description the present invention is done to describe further:
The specific implementation of a kind of print memory management method that can improve memory usage that the present invention relates to as shown in Figure 1, is as follows:
(1) at first, shown in the mark in the accompanying drawing 1 101, be current timestamp of page generation that to be ready accepting data.Timestamp is unique sign of each page, has identified the sequencing of the page, and the page that timestamp is more little uses the priority of internal memory high more, thereby the page that has guaranteed the front can not cause low memory because of the internal memory application of the back page;
(2) judge that memorymodel is a shared model, if not, then shown in Reference numeral 102, hang up the pattern of waiting for up to internal memory and become shared model;
(3) then, shown in Reference numeral 103, PRN device receives page data by interface from main frame
(4) then, shown in Reference numeral 104,, determine the section buffer size UnitSize of this page according to the number of the section that the page-size and the page thereof divided;
(5) then, shown in Reference numeral 105, the application internal memory is used to deposit the intermediate form of the page, page data is converted to the data of the intermediate form of forming by section;
(6) then, determine the rasterisation moment of each section shown in Reference numeral 106, the method for determining can be with reference to prior art; Calculate each section and begin to print constantly required buffer memory quantity in order to guarantee to print the quantity Bmax that carries out required buffer memory smoothly, describe in detail as shown in Figure 2 a section how calculating the page;
(7) shown in Reference numeral 107, the request memory management unit is that current page keeps buffer memory quantity Bmax required when beginning to print first section, and memorymodel is set to shared model;
(8) then, shown in Reference numeral 108, the application internal memory is used to deposit data with rasterized, and rasterisation need be before printing the section of rasterisation;
(9) then, shown in Reference numeral 109, start print engine, the beginning printer page, start the task of rasterisation simultaneously, the rasterisation task applies for constantly that at the rasterisation of each section size is corresponding section of the internal memory of UnitSize and rasterisation according to the beginning rasterisation of each section constantly.In print procedure, every printing finishes a section, discharges the shared internal memory of section printed, and asking memory management unit simultaneously is that amount of memory that current page keeps is the quantity Bmax of buffer memory required when beginning to print next section;
(10) last, shown in Reference numeral 110, after page print finishes, discharge all internal memories of this page intermediate form data occupancy, the request memory management unit is that current page keeps 0 buffer memory.
A section calculating the page as shown in Figure 2 begins to print the quantity Bmax that needs internal memory constantly, and step is as follows:
(1) at first, shown in Reference numeral 201, it is processing section that final stage is set, and the buffer memory quantity MaxBufferCount that the page is set to be needed is 0;
(2) then, shown in Reference numeral 202, determine that processing section begins to print constantly, begun the quantity BufferCount that rasterisation does not still also have to print the section that finishes;
(3) then, shown in Reference numeral 203, the buffer memory quantity Bmax of set handling section correspondence is the higher value among BufferCount and the MaxBufferCount.Carry out smoothly in order to guarantee to print, print constantly at processing section, not only to guarantee when beginning to print, to be carved with enough internal memories, also need in printing end during this period of time, enough internal memories arranged after this moment, so in order to guarantee normal printing, the buffer memory quantity that processing section needs is BufferCount, the greater among the MaxBufferCount;
(4) then, shown in Reference numeral 204, the buffer memory quantity MaxBufferCount that the page is set to be needed is the buffer memory quantity Bmax of processing section correspondence.MaxBufferCount record begins to handle the maximum quantity that in the time that page print the finishes page needs buffer memory from present segment;
(5) if also have section not calculate, shown in Reference numeral 205, the set handling section is the last period of current processing section, then, forwards to and continue to calculate next section in the step shown in Reference numeral 202.
As shown in Figure 3, Request System is the current page reserved memory, and the information that provides during request is the quantity that needs reserved memory (below be called request keep quantity) and proposes the page that internal memory keeps (below be called current page) that its detailed step is as follows:
(1), then shown in Reference numeral 301, calculates the free memory quantity of current page if current page is not also applied for reserved memory, check the quantity whether free memory of this page keeps greater than request, if not, low free memory is described, shown in Reference numeral 308, return mistake; If shown in Reference numeral 306, the internal memory that writes down this page keeps quantity and keeps quantity for request, then, shown in Reference numeral 307, it is that the internal memory of this page keeps quantity that the internal memory that this page is set needs quantity;
(2) if current page has been asked the internal memory reservation, whether the quantity that the request of inspection keeps is 0, if not, shown in Reference numeral 302, the internal memory that upgrades this page keeps quantity and keeps quantity for request, then, shown in Reference numeral 303, it is that the original internal memory of this page needs quantity to deduct the difference that original internal memory keeps quantity and request reservation quantity that updating memory needs quantity, if the quantity that request keeps is 0, shown in Reference numeral 304, the request of deleting this page keeps quantity information;
(3) then, shown in Reference numeral 305, wake hanging up of task up because of the application internal memory.
As shown in Figure 4, page application internal memory, the information that need provide during the application internal memory is the page of proposition internal memory application, and the size that will apply for internal memory, its detailed step is as follows:
(1) if this page internal memory reservation record is arranged, and the size of application internal memory and not of uniform size the causing of this page section buffering area, shown in Reference numeral 401, return mistake so;
(2) then, shown in Reference numeral 402, search one than in the big free memory block of the internal memory of application, if do not find qualified memory block, then shown in Reference numeral 403, hang up and wait for, otherwise, shown in Reference numeral 404, the memory block that current free block equals to find is set;
Whether (3) check can be from current free block the inside storage allocation, if can, change next step (shown in Reference numeral 405) over to, if cannot, shown in Reference numeral 409, search and check the big free memory block of internal memory that other also was not examined and ratio is applied for, if do not find such memory block, then shown in Reference numeral 403, hang up and wait for, otherwise, change the step shown in Reference numeral 404 over to, it is the memory block that finds that current free memory block is set, and repeats this step;
(4) shown in Reference numeral 405, current free memory block is divided into two, wherein first memory block is from the initial address of current free memory block, and size is the memory size of application, and the timestamp of first memory block is designated the timestamp of application memory pages; Second memory block is the remainder of removing first memory block, and the timestamp that is provided with second is 0, if its size is 0, deletes this memory block information;
(5) if this page is not also applied for internal memory to be kept, then shown in Reference numeral 406, first memory block internal memory of mark is masked as monopolizes sign; If this page applied for internal memory and kept, then shown in Reference numeral 407, need to deduct 1 the quantity from the internal memory of this page.
(6) last, shown in Reference numeral 408, return the start address of first memory block, this address is the memory address that will distribute.
As shown in Figure 5, discharge internal memory, the start address information of the memory block that discharge need be provided when discharging internal memory, its detailed step is as follows:
(1) at first, shown in Reference numeral 501, the memory block that will discharge according to the start address information searching of memory block is as processing block, if processing block is not monopolized mark, need quantity to add 1 the internal memory that discharges the page of internal memory, otherwise, the cancellation memory block monopolize mark;
(2) then, shown in Reference numeral 502, the timestamp of the memory block that will discharge changes to 0;
(3) then, shown in Reference numeral 503, merge adjacent free memory block.If having the timestamp adjacent with this memory block is 0 memory block, they are merged into a big memory block;
(4) last, shown in Reference numeral 504,, activate these tasks if hanging up because of the application internal memory of task is arranged.
Whether as shown in Figure 6, checking can be from storage allocation in the current free memory block, and its detailed step is as follows:
(1) at first, shown in Reference numeral 601, current free memory block is divided into two, wherein first memory block is from the initial address of current free memory block, size is the memory size of application, and second memory block is for deducting the remainder after first from current free memory block the inside;
(2) then, shown in Reference numeral 602, the timestamp of first memory block is designated the timestamp of the page of application internal memory; The timestamp that second memory block is set is 0;
(3) then, shown in Reference numeral 603,, need quantity to deduct 1 the internal memory of applying for memory pages if the page of application internal memory has had the internal memory reservation record;
(4) then, shown in Reference numeral 604,, calculate its free memory quantity, check that whether free memory quantity need quantity less than the internal memory of this page for the page of all timestamps smaller or equal to application memory pages timestamp.If the free memory quantity that has a page needs quantity less than the internal memory of this page, the result is for distributing, shown in Reference numeral 606, check result is set for distributing, otherwise the result is for distributing, shown in Reference numeral 605, check result is set for distributing;
(5) then, two the memory block that will be in the above shown in Reference numeral 607 be divided in the step reconsolidates, and its timestamp is changed to 0, at last, shown in Reference numeral 608, if the page of application internal memory has had the internal memory reservation record, need quantity to add 1 the internal memory of applying for memory pages.
As shown in Figure 7, calculate the free memory quantity of a page, wherein all memory blocks are arranged with start address order from small to large, and its detailed step is as follows:
(1) at first, shown in Reference numeral 701, initialization free memory number of blocks TotalCount is 0, and initialization memory block size UnitSize is the section buffer size of this page.Initialization free memory size BufferSize is 0;
(2) then, shown in Reference numeral 702, get first memory block, as processing block.If the timestamp of processing block is less than the timestamp of the page of request internal memory, then shown in Reference numeral 703, the value of upgrading free memory size BufferSize is the size of BufferSize+ processing block; If the timestamp of processing block is more than or equal to the timestamp of the page of request internal memory, shown in Reference numeral 704, upgrade free memory number of blocks TotalCount=TotalCount+floor (BufferSize/UnitSize), wherein floor (x) is the maximum integer littler than X, and putting bufferSize is 0;
(3) if there be not the next memory block adjacent with processing block, shown in Reference numeral 705, upgrade free memory number of blocks TotalCount=TotalCount+floor (BufferSize/UnitSize), TotalCount is this page free memory quantity, shown in Reference numeral 706, return TotalCount, finish.Otherwise, shown in Reference numeral 707, get with next adjacent memory block and change step (2) continuation inspection over to as processing block with processing block.
According to the above specific embodiment, adopt method of the present invention as can be seen, can improve the memory usage of print system greatly.Such as: print A, each needs the buffer memory of 5 sections the B page, system always has the buffer memory of 6 sections, so, use the static memory management in the prior art, because the A page has taken 5 buffer memorys, so the B page has only an available cache memory, so the B page has to wait until that the A page has discharged 4 buffer memorys and just can begin preliminary treatment later on.Adopt the method for the invention, though A has taken 5 buffer memorys, because the timestamp of B is bigger than A, so, B thinks that also it has 6 available cache memories, so B can buffer memory of first to file, section of beginning preliminary treatment, then, in print procedure, in case A reduces the demand of internal memory, B just can apply at once and request for utilization to buffer memory carry out preliminary treatment, and do not need 4 buffer memorys of A release by the time.

Claims (7)

1. print memory management method that can improve the print memory utilization rate may further comprise the steps:
A. the timestamp of all free memories of initialization is 0 during the print system initialization; The memory management pattern is set to shared model, for each page that will print, starts a task, handles following steps B to step I;
B. accept timestamp of page generation of data for current preparation, if the pattern of internal memory is not a shared model, hangs up the pattern of waiting for up to internal memory and become shared model, memorymodel is set to exclusive occupying mode then;
C. PRN device receives the page print data by interface from main frame;
D. determine the number of every page of section of being divided, determine to deposit the needed memory size UnitSize of data with rasterized of a section of this page, the section buffer size that writes down this page also is UnitSize;
E. apply for that internal memory is used to deposit page intermediate form data, print data is construed to the data of the intermediate form of forming by section;
F. determine the beginning rasterisation moment of each section;
G. determine each section printing zero hour in order to guarantee to print the quantity Bmax that carries out required buffer memory smoothly;
H. asking memory management unit is the quantity Bmax that current page keeps buffer memory required when beginning to print first section, and memorymodel is set to shared model;
I. apply for that internal memory is used to deposit data with rasterized, and rasterisation needs the section of pre-rasterisation, then, the beginning printer page, start the task of rasterisation simultaneously, the rasterisation task is according to the beginning rasterisation moment of each section of determining in the step F, the application size is used to deposit rasterization result for the internal memory of UnitSize, then rasterisation is corresponding section, in print procedure, every printing finishes a section, discharges the shared internal memory of data with rasterized of the section of having printed, and asking memory management unit simultaneously is the quantity Bmax that current page keeps buffer memory required when beginning to print next section;
J. after page print finishes, discharge all internal memories of this page intermediate form data occupancy, the request memory management unit is that current page keeps 0 buffer memory.
2. a kind of print memory management method that can improve the print memory utilization rate as claimed in claim 1, it is characterized in that: determine among the step G to begin to print constantly in order to guarantee to print the quantity Bmax that carries out required buffer memory smoothly at each section, method is to calculate each section to begin to print the quantity of needed buffer memory constantly, this quantity is carved into when being meant from this section printing prints the maximum quantity that is used for the memory block of buffer memory data with rasterized the process that finishes, and concrete steps are as follows:
(1) final stage that the page is set is a processing section, and the buffer memory quantity MaxBufferCount that the page is set to be needed is 0;
(2) computing section begin to print constantly rasterisation but also not have to print finish section quantity, and be recorded as BufferCount;
(3) the buffer memory quantity Bmax of set handling section correspondence is a bigger number among BufferCount and the MaxBufferCount;
(4) the buffer memory quantity MaxBufferCount that the page is set needs is the Bmax of processing section correspondence;
(5) if processing section is not first section of this page, change step (2) as processing section the last period of set handling section.
3. a kind of print memory management method that can improve the print memory utilization rate as claimed in claim 1 or 2, it is characterized in that: the request memory management unit is a page reserved memory among step H, the step I, the information that provides during request is to need the quantity of reserved memory to ask to keep quantity and propose the page current page that internal memory keeps, and concrete computational methods may further comprise the steps:
(1) if current page does not have the internal memory reservation record, then continue, otherwise, change step (3) over to;
(2) the free memory quantity of calculating current page, if the free memory quantity of current page keeps quantity greater than the request of this page, the internal memory that writes down this page so keeps quantity and keeps quantity for request, it is the internal memory reservation quantity of this page that the internal memory of this page of initialization simultaneously needs quantity, otherwise, directly return mistake, finish;
(3) if it is 0 that request keeps quantity, then delete the internal memory reservation record of current page, change step (5) over to, otherwise the reservation quantity of renewal current page keeps quantity for request;
(4) internal memory from this page needs to deduct the quantity difference that original internal memory keeps quantity and request reservation quantity;
(5) if current have task because request is suspended less than internal memory, wake these tasks up.
4. a kind of print memory management method that can improve the print memory utilization rate as claimed in claim 1, it is characterized in that: discharge internal memory among step J and the step I, the start address information of the memory block that will discharge need be provided when discharging internal memory, specifically may further comprise the steps:
(1) memory block that will discharge according to the start address information searching of memory block if processing block is not monopolized mark, needs quantity to add 1 the internal memory that discharges the page of internal memory as processing block, otherwise, the cancellation memory block monopolize mark;
(2) memory block that will discharge is labeled as the free time, and promptly the timestamp of the memory block that will discharge changes to 0;
(3) merging adjacent free memory block, is 0 memory block if promptly there be the timestamp adjacent with this memory block, then they is merged into a big memory block;
(4) if hanging up because of the application internal memory of task is arranged, activate these tasks.
5. a kind of print memory management method that can improve the print memory utilization rate as claimed in claim 1, it is characterized in that: step e, it among the step I page application internal memory, the information that need provide during the application internal memory is the page that proposes the internal memory application and the size that will apply for internal memory, may further comprise the steps:
(1) if the internal memory reservation record of the page that proposes the internal memory application is arranged, and the size of application internal memory and not of uniform size the causing of this page section buffering area, mistake returned so;
(2) search a big free memory block of internal memory than application;
(3) if do not find qualified memory block, then hang up and wait for, change step (2) over to and restart to search, otherwise, the memory block that current free memory block equals to find is set, continue to enter next step;
Whether (4) check can be from storage allocation in the current free memory block, if cannot, then search other and also be not examined and, change step (3) over to than the big free memory block of internal memory of application, otherwise, next step entered;
(5) current free memory block is divided into two, first initial address wherein from original memory block, size is the memory size of application, and first timestamp is designated the timestamp of application memory pages; Second second timestamp is 0 in order to remove first remainder, if its size is 0, then deletes this memory block information;
(6) if this page is not applied for internal memory to be kept, then the internal memory of first memory block of mark is masked as and monopolizes sign, changes step (8) over to;
(7) if this page has been applied for internal memory to be kept, then the internal memory from this page needs to deduct 1 the quantity;
(8) return the initial address of first memory block, this address is the memory address that will distribute.
6. a kind of print memory management method that can improve the print memory utilization rate as claimed in claim 5 is characterized in that: whether in the above-mentioned steps (4), checking can be from current free memory block the inside storage allocation, and its detailed step is as follows:
1) at first, current free memory block is divided into two, first initial address wherein from current free block, size is the memory size of application, second for removing first remainder;
2) timestamp of first memory block is designated the timestamp of the page of application internal memory; The timestamp that second memory block is set is 0;
3) if the page of application internal memory has the internal memory reservation record, need quantity to deduct 1 the internal memory that needs of applying for memory pages;
4) for the page of all timestamps smaller or equal to application memory pages timestamp, calculate its free memory quantity, check that whether free memory quantity need quantity less than the internal memory of this page, if the free memory quantity that has a page needs quantity less than the internal memory of this page, the result is for distributing, otherwise the result is for distributing;
Two the memory block that 5) will be divided in step 1) reconsolidates, and its timestamp is changed to 0, if the page of application internal memory has had the internal memory reservation record, needs quantity to add 1 the internal memory of applying for memory pages.
7. a kind of print memory management method that can improve the print memory utilization rate as claimed in claim 6, it is characterized in that: in step H and the step 4), calculate the free memory quantity of a page, memory block is arranged with start address order from small to large, and its method is as follows:
A. initialization free memory number of blocks TotalCount is 0, and initialization memory block size UnitSize is the section buffer size of this page, and initialization free memory size BufferSize is 0;
B. get first memory block as processing block;
If c. the timestamp of processing block is less than the timestamp of the page of request internal memory, then the size of BufferSize=BufferSize+ processing block changes step e then over to;
If d. the timestamp of processing block is more than or equal to the timestamp of the page of request internal memory, then upgrade free memory number of blocks TotalCount=TotalCount+floor (BufferSize/UnitSize), wherein floor (x) is a function, the maximum integer that expression is littler than x, it is 0 that BufferSize is set;
If e. there be not the next memory block adjacent with processing block, upgrade free memory number of blocks TotalCount=TotalCount+floor (BufferSize/UnitSize), TotalCount is this page free memory quantity, finish, otherwise get the memory block adjacent with processing block as processing block, change step c over to the next one.
CNB2005100050853A 2005-01-31 2005-01-31 Printing internal memory managing method for improving intenral memory availability Expired - Fee Related CN100360318C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100050853A CN100360318C (en) 2005-01-31 2005-01-31 Printing internal memory managing method for improving intenral memory availability

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100050853A CN100360318C (en) 2005-01-31 2005-01-31 Printing internal memory managing method for improving intenral memory availability

Publications (2)

Publication Number Publication Date
CN1644386A CN1644386A (en) 2005-07-27
CN100360318C true CN100360318C (en) 2008-01-09

Family

ID=34875179

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100050853A Expired - Fee Related CN100360318C (en) 2005-01-31 2005-01-31 Printing internal memory managing method for improving intenral memory availability

Country Status (1)

Country Link
CN (1) CN100360318C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753540A (en) * 2008-12-02 2010-06-23 中兴通讯股份有限公司 Method for transmitting complex message
CN102314323B (en) * 2010-06-30 2015-06-10 北京大学 Data processing method and device for printing output equipment
CN102567945B (en) * 2010-12-21 2014-12-10 北大方正集团有限公司 Method and device for rasterization treatment of page digital image

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10154048A (en) * 1996-11-21 1998-06-09 Seiko Epson Corp Memory management method and memory management device of printer
US5764869A (en) * 1995-09-25 1998-06-09 Hewlett-Packard Company Hot based printing system with raster image data buffering
US6040917A (en) * 1997-10-27 2000-03-21 Hewlett-Packard Company Memory partitioning for multi-resolution pauseless page printing
JP2002196904A (en) * 2000-11-09 2002-07-12 Texas Instruments Inc Method for converting page description data specifying document-to-be-printed into pixel data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5764869A (en) * 1995-09-25 1998-06-09 Hewlett-Packard Company Hot based printing system with raster image data buffering
JPH10154048A (en) * 1996-11-21 1998-06-09 Seiko Epson Corp Memory management method and memory management device of printer
US6040917A (en) * 1997-10-27 2000-03-21 Hewlett-Packard Company Memory partitioning for multi-resolution pauseless page printing
JP2002196904A (en) * 2000-11-09 2002-07-12 Texas Instruments Inc Method for converting page description data specifying document-to-be-printed into pixel data

Also Published As

Publication number Publication date
CN1644386A (en) 2005-07-27

Similar Documents

Publication Publication Date Title
US8861014B2 (en) Systems and methods for optimized printer throughput in a multi-core environment
CN100590609C (en) Method for managing dynamic internal memory base on discontinuous page
DE102012216568B4 (en) Scheduling and managing compute tasks with different execution priority levels
US8736876B2 (en) Print document processing system, cache apparatus, data processing apparatus, non-transitory computer readable medium storing program, and print document processing method
US8810813B2 (en) Print document processing system, cache apparatus, computer readable medium storing program, and print document processing method
CN1728118B (en) Resource allocation management method and apparatus
US20070180161A1 (en) DMA transfer apparatus
CN101859257A (en) The system and method that is used for deadlock-free pipelining
DE102009039231A1 (en) Single pass tiling
US20090249017A1 (en) Systems and Methods for Memory Management for Rasterization
CN106547612A (en) A kind of multi-task processing method and device
US20070229900A1 (en) Systems and methods for display list management
JPH09251361A (en) Information processor, information processing method, printing system and memory
CN100360318C (en) Printing internal memory managing method for improving intenral memory availability
US7353338B2 (en) Credit mechanism for multiple banks of shared cache
WO2007144622A1 (en) Parameter compaction in tile based rendering device
DE112005002432T5 (en) Method and apparatus for providing a source operand for an instruction in a processor
CN114880259A (en) Data processing method, device, system, electronic equipment and storage medium
US7145669B2 (en) Partially pre-rasterizing image data
CN101534319B (en) Method, system and proxy server for canceling inter-instruction dependency relationship
JP6766598B2 (en) Image processing device, image processing method and control program
US9772964B2 (en) Multicore processor system, computer product, assigning method, and control method
CN117472815A (en) Storage module conversion interface under AXI protocol and conversion method thereof
US8976373B2 (en) Image processing apparatus, computer-readable storage medium storing program and image processing method
JP2007323393A (en) Image processor and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080109

Termination date: 20190131

CF01 Termination of patent right due to non-payment of annual fee