Method and apparatus for reclaiming memory
First Claim
1. In a computer system that runs in two modes, a first-mode having a first addressing range, and a second mode having a second addressing range that is greater than and includes the first addressing range, a method of reclaiming memory occupied by first-mode software components when the system switches from first-mode to second-mode to run a second-mode application in memory, the method comprising the following steps:
- splitting first-mode software components into a non-removable core portion stored in one part of memory in the first addressing range and a removable portion relocated to another part of memory in the first addressing range;
starting a second-mode application in memory;
determining which first-mode software components in memory are functionally equivalent to second-mode components of a second-mode application;
modifying the non-removable core portion of a first-mode software component to refer to an equivalent second-mode component, wherein the modifying step includes;
storing the first-mode removable and non-removable core portions in another storage location for later retrieval;
replacing all references to the first-mode removable portion in the first-mode non-removable core portion with references to the equivalent second-mode component; and
replacing all execution paths in the first-mode non-removable core portion that travel through the first-mode removable portion with execution paths through the second-mode component that circumvent the first-mode removable portion; and
reclaiming memory in the first addressing range occupied by the removable portion of the first-mode component.
4 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for automatically reclaiming and restoring memory occupied by redundant software components. In a computing environment which permits applications to run in the real-mode as well as the protected-mode, only one set of software components, either real-mode or protected-mode can be active at any one time. Protected-mode applications cooperate with a real-mode applications to remove and reclaim the memory occupied by redundant software components such as device drivers when the protected-mode applications boots. The real-mode software components are restored and replaced in memory when the protected-mode application quits. The memory reclaimed from redundant software components contributes to the maximum amount of memory available for use by both protected-mode applications, and real-mode applications.
-
Citations
7 Claims
-
1. In a computer system that runs in two modes, a first-mode having a first addressing range, and a second mode having a second addressing range that is greater than and includes the first addressing range, a method of reclaiming memory occupied by first-mode software components when the system switches from first-mode to second-mode to run a second-mode application in memory, the method comprising the following steps:
-
splitting first-mode software components into a non-removable core portion stored in one part of memory in the first addressing range and a removable portion relocated to another part of memory in the first addressing range; starting a second-mode application in memory; determining which first-mode software components in memory are functionally equivalent to second-mode components of a second-mode application; modifying the non-removable core portion of a first-mode software component to refer to an equivalent second-mode component, wherein the modifying step includes; storing the first-mode removable and non-removable core portions in another storage location for later retrieval; replacing all references to the first-mode removable portion in the first-mode non-removable core portion with references to the equivalent second-mode component; and replacing all execution paths in the first-mode non-removable core portion that travel through the first-mode removable portion with execution paths through the second-mode component that circumvent the first-mode removable portion; and reclaiming memory in the first addressing range occupied by the removable portion of the first-mode component. - View Dependent Claims (7)
-
-
2. In a computer system that runs in two modes, a first-mode and a second-mode, a method of reclaiming memory occupied by first-mode software components when the system switches from first-mode to second-mode to run a second-mode application in memory, the method comprising:
-
splitting first-mode software components into a non-removable core portion stored in one part of memory and a removable portion relocated to another part of memory; starting a second-mode application in memory; determining which first-mode software components in memory are functionally equivalent to second-mode components of a second-mode application; modifying the core portion of a first-mode software component, where the core portion refers to the non-removable portion, to refer to an equivalent second-mode component; and reclaiming memory occupied by the removable portion of the first-mode component, wherein the memory occupied by the removable portion of the first-mode component is divided into memory blocks, the reclaiming memory including; determining if the size of a first memory block to be reclaimed is equivalent in size to an operating system memory page, if so, returning the occupied memory as an operating system memory page to a memory pool, if not, further determining; if a second memory block adjoining the first memory block is reclaimable, if so, not returning the first memory block to the memory pool so an operating system memory page may be reclaimed later by collecting adjoining first and second memory blocks, and if not, returning the first memory block as a memory block to the memory pool. - View Dependent Claims (3)
-
-
4. In a computer system that runs in two modes, a first-mode and a second-mode, a method of reclaiming memory occupied by first-mode software components when the system switches from first-mode to second-mode to run a second-mode application in memory, the method comprising:
-
splitting first-mode software components into a non-removable core portion stored in one part of memory and a removable portion relocated to another part of memory; starting a second-mode application in memory; determining which first-mode software components in memory are functionally equivalent to second-mode components of a second-mode application; modifying the core portion of a first-mode software component, where the core portion refers to the non-removable portion, to refer to an equivalent second-mode component; reclaiming memory occupied by the removable portion of the first-mode component; terminating the second-mode application started in memory; re-allocating memory to hold the removable portion of the first-mode software component to be restored; restoring the first-mode removable portion from other storage to its original location in memory; and restoring the first-mode core portion of the first-mode software component from other storage to refer again to the first-mode removable portion in memory, thereby restoring the first-mode software component to the memory. - View Dependent Claims (5)
-
-
6. A computer system that runs in first-mode and second-mode and reclaims memory from first-mode software components, comprising:
-
means for loading a first-mode software component into memory which splits into a non-removable core portion and a removable portion; means for determining which first-mode software components in memory are functionally equivalent to second-mode components of a second-mode application; means for modifying the non-removable core portion of the first-mode software component, where the core portion refers to the removable portion, to refer to the equivalent second-mode component; means for reclaiming memory occupied by the removable portion of the first-mode component; means for re-allocating memory to hold the removable portion of the first-mode software component to be restored; means for restoring the removable portion from other storage to its original location in memory; and means for restoring the core portion of the first-mode software component from other storage to refer again to the removable portion in memory.
-
Specification