An image forming apparatus, comprising: an image input unit which receives image data from one of a scanner, a printer, and a facsimile; an image storage unit (506, 606, 607) being a storage resource which includes a primary memory unit storing therein the image data supplied from said image input unit at a time of image input, and includes a secondary memory unit storing therein the image data of the primary memory unit and outputting the image data to said primary memory unit at a time of image output; an image forming unit which forms an image for a printout by reading the image data from said image storage unit (506, 606, 607); a first resource allocation unit which performs storage resource acquisition and storage release only once, wherein the primary memory unit is acquired and released only once when performing a transfer of image data for inputting the image data into said image storage unit (506, 606, 607) or when performing a transfer of image data for outputting the image data for the printout; a second resource allocation unit which performs storage resource acquisition and release multiple times, wherein the secondary memory unit is acquired and released multiple times when performing a transfer of image data for inputting the image data into said image storage unit (506, 606, 607) or when performing a transfer of image data for outputting the image data for the printout; a resource control unit which selects one of said first resource allocation unit and said second resource allocation unit to be used according to a type of a job for inputting or outputting of the image data; a resource-acquisition-priority setting unit which determines priority levels regarding resource acquisition when a plurality of jobs for inputting or outputting the image data make conflicting requests for a storage resource; and a resource-allocation determining unit which determines a job for inputting or outputting the image data that is to use the storage resource based on the priority levels determined by said resource-acquisition-priority setting unit; wherein said second resource allocation unit is adapted to release the secondary memory unit at a timing that satisfies: a time from resource acquisition to resource release is less than a tolerable time limit from transfer request to transfer completion minus a time required for image transfer when performing resource acquisition and release multiple times. an image input unit which receives image data from one of a scanner, a printer, and a facsimile; an image storage unit (506, 606, 607) being a storage resource which includes a primary memory unit storing therein the image data supplied from said image input unit at a time of image input, and includes a secondary memory unit storing therein the image data of the primary memory unit and outputting the image data to said primary memory unit at a time of image output; an image forming unit which forms an image for a printout by reading the image data from said image storage unit (506, 606, 607); a first resource allocation unit which performs storage resource acquisition and storage release only once, wherein the primary memory unit is acquired and released only once when performing a transfer of image data for inputting the image data into said image storage unit (506, 606, 607) or when performing a transfer of image data for outputting the image data for the printout; a second resource allocation unit which performs storage resource acquisition and release multiple times, wherein the secondary memory unit is acquired and released multiple times when performing a transfer of image data for inputting the image data into said image storage unit (506, 606, 607) or when performing a transfer of image data for outputting the image data for the printout; a resource control unit which selects one of said first resource allocation unit and said second resource allocation unit to be used according to a type of a job for inputting or outputting of the image data; a resource-acquisition-priority setting unit which determines priority levels regarding resource acquisition when a plurality of jobs for inputting or outputting the image data make conflicting requests for a storage resource; and a resource-allocation determining unit which determines a job for inputting or outputting the image data that is to use the storage resource based on the priority levels determined by said resource-acquisition-priority setting unit; a time from resource acquisition to resource release is less than a tolerable time limit from transfer request to transfer completion minus a time required for image transfer when performing resource acquisition and release multiple times.