SHA-2 doesn't need 80 or 64 slots for W. You can use 16 slots in a cyclical fashion.
    
    // something like this for $t >= 16
    W[$t & 15] = sigma1(W[($t - 2) & 15]) + W[($t - 7) & 15] + sigma0(W[($t - 15) & 15]) + W[($t - 16) & 15];

maybe the code is laid out so well that the compiler already does something similar