Patent ID: 8510710

Claim:
A computer-implemented method of performing string operations in a virtual machine environment implemented by a computer system having a processor and a memory, comprising: creating, by the processor, a character array in a character array area in the memory; creating, by the processor, a plurality of thread-local character array areas in the memory, wherein each of the plurality of thread-local character array areas is respectively associated with a corresponding one of a plurality of threads, and wherein each of the plurality of thread-local character array areas has a plurality of character array slots; detecting, by the processor, a string operation that qualifies for using a thread-local character array from a thread-local character array area of the plurality of thread-local character array areas that is associated with a thread of the plurality of threads; borrowing, by the processor, the thread-local character array of a thread-local character array slot of the thread-local character array area; performing, by the processor, the string operation using the thread-local character array having been borrowed, instead of using the character array; and returning, by the processor, the thread-local character array to the thread-local character array slot when the string operation has been performed.