System and method for embedded java memory footprint performance improvement
Abstract
A system and method are provided to allow demand loading and discarding of Java executable image (JXE) files. The virtual machine allocates an address space for a requested JXE program. The read-only portion of the JXE file is memory mapped from its nonvolatile location to the allocated memory space using read-only mapping and the read/write section of the JXE file are loaded into memory. When a page of the JXE program is needed, a page fault occurs if the read-only portion has not been loaded into memory. The operating system's page fault handler retrieves the needed page(s) from the nonvolatile storage location based upon the mapping data that resulted from the previously performed memory mapping. Because the read-only section of the JXE file is memory mapped using read-only mapping, the operating system's paging process is free to discard previously loaded memory pages that contain read-only portions of the JXE file.
Claims
exact text as granted — not AI-modified1 . A computer implemented method of loading pages of a Java executable image, said method comprising:
mapping a read-only section of the Java executable image stored on a nonvolatile storage device to an address space located in a system memory; storing mapping data resulting from the mapping in a page map; branching to an address within the address space, the branching causing a page fault; loading one or more pages from the nonvolatile storage device to the address space in response to the page fault; and executing instructions included on the loaded pages, the executing commencing at the address.
2 . The method of claim 1 further comprising:
selecting, based upon a system paging policy, one or more of the loaded pages; and discarding the loaded pages.
3 . The method of claim 2 further comprising:
branching to a second address that was included in one of the discarded pages, the branching causing a second page fault; retrieving one or more of the pages from the Java executable image stored on the nonvolatile storage device, wherein the retrieved pages correspond to one or more of the discarded pages; and loading the retrieved pages into the address space, wherein the address space includes the second address.
4 . The method of claim 1 further comprising:
receiving a request to load the Java executable image; and allocating the address space in the system memory prior to the branching.
5 . The method of claim 4 wherein the size of the address space is less than the size of the Java executable image stored on the nonvolatile storage device.
6 . The method of claim 1 wherein the storing further comprises:
writing one or more page addresses to the page map; and writing a nonvolatile storage location corresponding to each of the written page addresses to the page map.
7 . The method of claim 1 further comprising:
initializing the Java executable image by branching to the address, wherein the address is the initial address of the Java executable image.
8 . An information handling system comprising:
one or more processors; a memory accessible by the processors; a nonvolatile storage device accessible by the processors that includes one or more Java executable images, the Java executable images including a read-only section; a tool for loading the Java executable images, the tool including software code effective to:
receive a request to load one of the Java executable images;
allocate an address space in the system memory;
map a read-only section of the Java executable image to the address space;
store mapping data resulting from the mapping in a page map;
cause a page fault by branching to an address within the address space;
load one or more pages from the nonvolatile storage device to the address space in response to the page fault; and
execute instructions included on the loaded pages, the executing commencing at the address.
9 . The information handling system of claim 8 wherein the tool includes software code effective to:
select, based upon a system paging policy, one or more of the loaded pages; and discard the loaded pages.
10 . The information handling system of claim 9 wherein the tool includes software code effective to:
branch to a second address that was included in one of the discarded pages, the branching causing a second page fault; retrieve one or more of the pages from the Java executable image stored on the nonvolatile storage device, wherein the retrieved pages correspond to one or more of the discarded pages; and load the retrieved pages into the address space, wherein the address space includes the second address.
11 . The information handling system of claim 8 wherein the size of the address space is less than the size of the Java executable image loaded from the nonvolatile storage device.
12 . The information handling system of claim 8 wherein the software code effective to store the mapping data further comprises software code effective to:
write one or more page addresses to the page map; and write a nonvolatile storage location corresponding to each of the written page addresses to the page map.
13 . The information handling system of claim 8 wherein the tool includes software code effective to:
initialize the Java executable image by branching to the address, wherein the address is the initial address of the Java executable image.
14 . A computer program product stored on a computer operable media for loading pages of a Java executable image, said computer program product comprising:
means for mapping a read-only section of the Java executable image stored on a nonvolatile storage device to an address space located in a system memory; means for storing mapping data resulting from the mapping in a page map; means for branching to an address within the address space, the branching causing a page fault; means for loading one or more pages from the nonvolatile storage device to the address space in response to the page fault; and means for executing instructions included on the loaded pages, the executing commencing at the address.
15 . The computer program product of claim 14 further comprising:
means for selecting, based upon a system paging policy, one or more of the loaded pages; and means for discarding the loaded pages.
16 . The computer program product of claim 15 further comprising:
means for branching to a second address that was included in one of the discarded pages, the branching causing a second page fault; means for retrieving one or more of the pages from the Java executable image stored on the nonvolatile storage device, wherein the retrieved pages correspond to one or more of the discarded pages; and means for loading the retrieved pages into the address space, wherein the address space includes the second address.
17 . The computer program product of claim 14 further comprising:
means for receiving a request to load the Java executable image; and means for allocating the address space in the system memory prior to the branching.
18 . The computer program product of claim 17 wherein the size of the address space is less than the size of the Java executable image stored on the nonvolatile storage device.
19 . The computer program product of claim 14 wherein the means for storing further comprises:
means for writing one or more page addresses to the page map; and means for writing a nonvolatile storage location corresponding to each of the written page addresses to the page map.
20 . The computer program product of claim 14 further comprising:
means for initializing the Java executable image by branching to the address, wherein the address is the initial address of the Java executable image.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.