Spilling

A register allocator needs to map a large number of variables to a smaller number of physical registers. If a larger number of variables are in use at the same time than the number of available registers, spilling needs to take place, i.e. some variables have to be moved to memory. Typically, they are moved to positions on the stack frame of the method that is being generated. Spill move instructions to and from memory are inserted at appropriate places in the code. Large amounts of spill code leads to performance loss.

See also Register allocation and Atomic instructions.

Get Oracle JRockit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.