If the first one has more RAM, it could potentially be operating at a higher speed of processing your automation. If the application being tested is operating at a (relatively) constant performance (such as a static amount of time between clicking a button and getting a response), it could be that the scripts are expecting the next button, form, component, page, window, etc, to be present before the application has actually presented it. We've had that occur in our environments.
If this is the case, solution would be to embed "Wait" routines in certain time critical sections of your automation where, after performing an action, you need to wait for something to process before you perform the next action.