That depends.
When having to little RAM building the game is going to take much longer or when you try to build a bigger game, you probably get a crash or stuck for a very long time.
But it could also be the options you choose when building the game. If you're going to use full lightmapping and full shaders building the game takes a lot of time. I suggest switch of full shaders, set lightmappng to soft lightmaps, switch off dynamic lights also perhaps and try building the game again to see if it works now.
Another thing that's happening can be the way you designed your levels. If you create use levels with lot's of entities, it's going to take a long time to build the game or if you add to much it may not build at all.
Try creating a small level first, put a few entities in it, not lot's. Don't use dynamic lights, but static lights only. Set lightmapping to soft and switch off dynamic light and shaders when you're going to build. See what happens.
If it doesn't build then or is still very slow (over half an hour), it's time for an upgrade.
They don't recommend 512MB Ram for fun, they do it for a reason. If you're using less RAM you can expect problems.