Array Bounds Check Elimination Utilizing a Page Protection Mechanism

In the past, there have been many research projects to eliminate array bounds checking. These approaches eliminated an array bounds check only if the array access corresponding to the check is known to be always valid. This paper presents a technique for eliminating an array bounds check even if it cannot be determined whether or not the corresponding array access for the target bounds check is always valid. We utilize a page protection mechanism to support this elimination. This technique can eliminate more array bounds checks than previous approaches. Our approach first allocates both a normal memory area and a protected area at the time of array allocation. It next analyzes whether a memory operation always accesses the protected area when the memory operation performs an invalid access. If this condition is satisfied, we eliminate the array bound check for the memory operation. This paper also covers how to limit the target arrays in order to reduce memory consumption and the cost of setting up this page protection. We select arrays by using two characteristics, the number of elements and life expectancy. Using these selection criteria, small and short-lived array objects are normally allocated.

By: Motohiro Kawahito

Published in: RT0550 in 2007

LIMITED DISTRIBUTION NOTICE:

This Research Report is available. This report has been submitted for publication outside of IBM and will probably be copyrighted if accepted for publication. It has been issued as a Research Report for early dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should be limited to peer communications and specific requests. After outside publication, requests should be filled only by reprints or legally obtained copies of the article (e.g., payment of royalties). I have read and understand this notice and am a member of the scientific community outside or inside of IBM seeking a single copy only.

RT0550.pdf

Questions about this service can be mailed to reports@us.ibm.com .