US2013138914A1PendingUtilityA1

Information processing apparatus and program and method for adjusting initial array size

Assignee: IBMPriority: Nov 30, 2011Filed: Jan 24, 2013Published: May 30, 2013
Est. expiryNov 30, 2031(~5.3 yrs left)· nominal 20-yr term from priority
Inventors:Rei Odaira
G06F 12/0646G06F 9/45516
49
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

An adjustment apparatus includes a storage device, an execution target program, an execution unit, a first API, a second API, a profiler, and a dynamic compiler. The execution unit interprets the program, and calls and executes a function of an API in response to the API description. The first and second API are callable by the execution unit, to respectively allocate an array of a predetermined size, and extend the array. The first and second APIs are converted into code to store an array allocation call context of the pre-extension array into a profile information storage area of the allocated array. The profiler profiles access to arrays. The dynamic compiler inline-expands an array allocation call context included in a code part to be dynamically compiled and embeds an array size determined based on context based access information, as an allocation initial size of the array, into the code part.

Claims

exact text as granted — not AI-modified
1 . A method of allowing an information processing apparatus to dynamically adjust an initial size of an array, the method comprising the steps, executed by the information processing apparatus, of:
 (a) allocating an array of a predetermined size in response to an array allocation request from an execution target program, and storing allocation call context information of the array into a profile information storage area of the array;   (b) newly allocating, as an extended array, an array of a larger size than the predetermined size in response to a request to extend the size of the allocated array from the execution target program, and storing the allocation call context information of the original pre-extension array into the profile information storage area of the extended array;   (c) in response to an access to a profile target array during execution of the execution target program, storing access information into the profile information storage area of the profile target array;   (d) collecting the access information stored in the profile information storage areas of arrays for each array allocation call context; and   (e) in response to dynamic compilation of a code part to be executed next in the execution target program, inline-expanding an array allocation call context included in the code part, and embedding an array size determined based on the access information collected for the context, as an allocation initial size of the array, into the inline-expanded code.   
     
     
         2 . The adjustment method according to  claim 1 , wherein
 the access information stored in the profile information storage area of each of the arrays is an index value of an element located at the end in accessed elements of the each array, and   the step (e) comprises the step of determining, as the allocation initial size of the array, the largest index value in a plurality of index values which are the collected access information.   
     
     
         3 . The adjustment method according to  claim 1 , wherein
 the access information stored in the profile information storage area of each of the arrays is an index value of an element located at the end in accessed elements of the each array, and   the step (e) comprises the step of determining, as the allocation initial size of the array, an index value corresponding to the highest frequency in a plurality of index values which are the collected access information.

Join the waitlist — get patent alerts

Track US2013138914A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.