Use a linked list rather than an array for local variables.