Systems and Means of Informatics

2016, Volume 26, Issue 1, pp 4-12

SPARSE BUFFERS - USING THE VIRTUAL MEMORY MECHANISM TO REDUCE PHYSICAL MEMORY AND CPU TIME USAGE

  • I. M. Adamovich
  • D. V. Zemskov

Abstract

This article discusses sparse buffers - address ranges in computer's virtual memory, for which mapping to the physical memory is partially or completely absent. Such buffers are intended for use in subroutines to transfer to them input data or to obtain from them output data so that when a subroutine reads or writes data at addresses for which no physical memory is allocated, a registered exception handler is called that allocates physical memory for virtual memory fragment to which access has been made, and in the case of reading data fills that memory with the necessary data. Actions made by a subroutine handler do not affect the execution of the subroutine, i.e., are transparent to it. This mechanism allows avoiding unnecessary allocation of physical memory when the amount of read or written data is less than the provided buffer's size and, in the case of reading the data, allows saving the CPU time required to fill the buffer with portions of data that would not be used by the subroutine.

[+] References (4)

[+] About this article