Maybe its because my system is kind of low in RAM(512 MB-can this have an effect in AV performance?)
It could be, depending on what other programs are running in background.
How exactly does it freeze? Does it happen always approximately at the same place/folder of the scan?
Do you see a hard disk activity (when it freezes)? Is only the program frozen, or the whole computer (possibly with mouse cursor)?
Also, let's say clearly: if during an avast! scan,
1. avast! freezes or crashes, it's probably avast! problem.
2. The computer freezes or restarts, it could be e.g. a conflict with some other program, or a hardware problem.
3. The computer powers down - it's probably a hardware problem (e.g. overheating). The scan generates a lot of hard disk activity (and is also CPU intensive), which may increase the temperature of your hardware. I suggest to check the coolers in the case.
4. If you get a blue screen, it could have a bug in avast! drivers (but then, there is not a power down).