Patent ID: 7506122

Claim:
A computer program embodied in a tangible, computer-readable medium and executable in a computer system, the computer program enabling a first software entity to use an address space of a second software entity while preventing the second software entity from accessing memory of the first software entity, the computer system implementing segmented memory and memory paging, the computer system having a first operating mode in which instructions are sometimes executed at a more-privileged level and sometimes at a less-privileged level and in which a first set of one or more instructions accesses the memory of the first software entity and a second set of one or more instructions is to be prevented from accessing the memory of the first software entity, the computer system also having a second operating mode in which instructions are executed at a less-privileged level and in which a third set of instructions is to be prevented from accessing the memory of the first software entity, the computer program performing a method comprising: during the first operating mode, using effectively truncated memory segments for the second set of instructions, the effectively truncated memory segments excluding the memory of the first software entity; during the first operating mode, if memory paging protection is active, deactivating memory paging protection before executing instructions at the less-privileged level; during the second operating mode, if memory paging protection is inactive, using completely truncated memory segments for the third set of instructions, the completely truncated memory segments excluding the memory of the first software entity; at some time when instructions are not being executed at the less-privileged level in the first operating mode, activating memory paging protection so that, during the second operating mode, instructions executed at the less-privileged level cannot access the memory of the first software entity; and during the second operating mode, if memory paging protection is active, using one or more untruncated memory segments for the third set of instructions, at least one of the untruncated memory segments including at least a portion of the memory of the first software entity.