Method and apparatus for allocating memory for immutable data on a computing device
First Claim
1. A method comprising:
- allocating a memory region on a computing device to store blocks of immutable data on a computing device, wherein the immutable data as a whole does not fit in the memory region and wherein a table of block descriptors maintains one or more currently-used block descriptor entries that each comprise statistical information for one of the blocks and a function pointer that points to a function for regenerating the data in an immutable block that is referenced by the block descriptor entry; and
while executing an application on the computing device, in response to a request to access a particular block of the immutable data that is not already present in the memory region,determining whether space is available in the memory region to store the particular block,in response to determining that there is not enough space available in the memory region to store the particular block, using statistical information for the blocks that are stored in the memory region to identify a target block that is unlikely to be accessed before others of the blocks that are stored in the memory region, and evicting the target block from the memory region, wherein the statistical information for the blocks comprises statistical information for the target block that is retrieved from a block descriptor entry that is associated with the target block,allocating space for the particular block of the immutable data in the memory region,loading the particular block of the immutable data into the allocated space, andaccessing the particular block of the immutable data from the allocated space in the memory region.
0 Assignments
0 Petitions
Accused Products
Abstract
A system that allocates memory for immutable data on a computing device. The system allocates a memory region on the computing device to store immutable data for an executing application. This memory region is smaller than the immutable data for the application. When the system subsequently receives a request to access a block of immutable data for the application, the system allocates space in this memory region for the block, and proceeds to load the block into the memory region. If at a later time the space occupied by this first block is needed for another block, the system unloads and discards the first block. If a subsequent operation needs to use information in the first block, the system regenerates the block by transforming raw data associated with the block into a form that can be directly accessed by the application, and then reloads the block into the memory region.
55 Citations
19 Claims
-
1. A method comprising:
-
allocating a memory region on a computing device to store blocks of immutable data on a computing device, wherein the immutable data as a whole does not fit in the memory region and wherein a table of block descriptors maintains one or more currently-used block descriptor entries that each comprise statistical information for one of the blocks and a function pointer that points to a function for regenerating the data in an immutable block that is referenced by the block descriptor entry; and while executing an application on the computing device, in response to a request to access a particular block of the immutable data that is not already present in the memory region, determining whether space is available in the memory region to store the particular block, in response to determining that there is not enough space available in the memory region to store the particular block, using statistical information for the blocks that are stored in the memory region to identify a target block that is unlikely to be accessed before others of the blocks that are stored in the memory region, and evicting the target block from the memory region, wherein the statistical information for the blocks comprises statistical information for the target block that is retrieved from a block descriptor entry that is associated with the target block, allocating space for the particular block of the immutable data in the memory region, loading the particular block of the immutable data into the allocated space, and accessing the particular block of the immutable data from the allocated space in the memory region. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. One or more non-transitory computer-readable storage media storing instructions that when executed by a computer cause the computer to perform a method comprising:
-
allocating a memory region on a computing device to store blocks of immutable data on a computing device, wherein the immutable data as a whole does not fit in the memory region and wherein a table of block descriptors maintains one or more currently-used block descriptor entries that each comprise statistical information for one of the blocks and a function pointer that points to a function for regenerating the data in an immutable block that is referenced by the block descriptor entry; and while executing an application on the computing device, in response to a request to access a particular block of the immutable data that is not already present in the memory region, determining whether space is available in the memory region to store the particular block, in response to determining that there is not enough space available in the memory region to store the particular block, using statistical information for the blocks that are stored in the memory region to identify a target block that is unlikely to be accessed before others of the blocks that are stored in the memory region, and evicting the target block from the memory region, wherein the statistical information for the blocks comprises statistical information for the target block that is retrieved from a block descriptor entry that is associated with the target block, allocating space for the particular block of the immutable data in the memory region, loading the particular block of the immutable data into the allocated space, and accessing the particular block of the immutable data from the allocated space in the memory region. - View Dependent Claims (11, 12, 13, 14, 15, 16)
-
-
17. An apparatus that allocates memory for immutable data on a computing device, comprising:
-
a processor; a memory; and a computer-readable storage medium comprising instructions that, when executed by the processor, instantiate; an allocation mechanism configured to allocate a memory region on the computing device to store blocks of immutable data on a computing device, wherein the immutable data as a whole does not fit in the memory region and wherein a table of block descriptors maintains one or more currently-used block descriptor entries that each comprise statistical information for one of the blocks and a function pointer that points to a function for regenerating the data in an immutable block that is referenced by the block descriptor entry; an execution mechanism configured to execute an application; and while executing an application on the computing device, in response to a request to access a particular block of the immutable data that is not already present in the memory region, the execution mechanism is configured to, determine whether space is available in the memory region to store the particular block, in response to determining that there is not enough space available in the memory region to store the particular block, use statistical information for the blocks that are stored in the memory region to identify a target block that is unlikely to be accessed before others of the blocks that are stored in the memory region, and evict the target block from the memory region, wherein the statistical information for the blocks comprises statistical information for the target block that is retrieved from a block descriptor entry that is associated with the target block, allocate space for the particular block of the immutable data in the memory region, load the particular block of the immutable data into the allocated space, and access the particular block of the immutable data from the allocated space in the memory region. - View Dependent Claims (18, 19)
-
Specification