主权项 |
1. An image forming device comprising:
a printer; a scanner; a network communication unit; a memory; and a central processing unit (CPU) as a controller, wherein the CPU is configured for: i) allocating a first region having a maximum size required for a first process, the first process being a main process that includes a plurality of sub processes as a plurality of second processes, wherein the first process includes a process for one page of an image, and the plurality of second processes include processes for each of a plurality of parts when dividing one page of the image into the plurality of parts; ii) determining the first region having the maximum size, if the first process is a printing process performed by the printer, based on the largest paper sheet size of print data received via the network communication unit in the printing process; iii) determining the first region having the maximum size, if the first process is a process that uses the scanner including a copy function, based on the size of an original document read by the scanner; iv) dividing the first region into a plurality of second regions having a specified size required for each of the plurality of second processes, from a specified position in the first region, wherein the specified position is located from the beginning of the first region, and is updated by a size of a second region whenever dividing the first region into each of the plurality of second regions, regardless of a page basis used as a unit in a memory management; and v) releasing a region for release from the first region when the plurality of second regions have been allocated for all second processes included in the first process, wherein the region for release is the first region other than the plurality of second regions and is released on the page basis used as the unit in the memory management. |