Ok, looks like LazReport is the culprit i.e. the one in the install/uninstall packages and Zeoslib from the online package manager also causes a out of memory error when linking lazarus.exe.
Something is messed up either with the packages or with 1.8.2. I guess I am going to go back to 1.8.0.
I guess I will uninstall Virtualtreeview and indy and see if lazreport will then install. Not for sure clear if it's certain packages or just the number of packages installed.
Update1: I removed Indy 10 and then Lazreport installed, now going to see if Zeos lib will install.
update2: zeos fails, going to remove another package and see if Zeos installs.
Ok, removed lazreport and then zeos installed, it's looking like a package number issue. weird. going back to 1.8.0