I had this issue with S3 for ages and eventually switched to FF full time. Upgrading to 4 fixed this for a while but it's back again. I've binned the prefs file, no change, I've hunted down every single file related to safari and binned it, no change, I've re downloaded safari and reinstalled it, no change. I've set up a second user account and it still quits.
no idea what else to try.
edit:
have a crash report. Looks like ram from the start but no other issues with other apps hitting ram issues.
Process: Safari [338]
Path: /Applications/Safari.app/Contents/MacOS/Safari
Identifier: com.apple.Safari
Version: 4.0.3 (5531.9)
Build Info: WebBrowser-55310900~1
Code Type: X86 (Native)
Parent Process: launchd [95]
Interval Since Last Report: 495803 sec
Crashes Since Last Report: -69
Per-App Interval Since Last Report: 73 sec
Per-App Crashes Since Last Report: 10
Date/Time: 2009-09-02 21:41:34.316 +0100
OS Version: Mac OS X 10.5.8 (9L30)
Report Version: 6
Anonymous UUID: 8194B3E5-9911-4364-91E8-738B09164C99
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000020
Crashed Thread: 0
Thread 0 Crashed:
0 libobjc.A.dylib 0x95e17688 objc_msgSend + 24
1 libobjc.A.dylib 0x95e0fbdf call_load_methods + 214
2 libobjc.A.dylib 0x95e090d3 load_images + 98
3 dyld 0x8fe02e38 dyld::notifySingle(dyld_image_states, mach_header const*, char const*, long) + 328
4 dyld 0x8fe0e7cf ImageLoader::recursiveInitialization(ImageLoader:: LinkContext const&, unsigned int) + 287
5 dyld 0x8fe0e8c9 ImageLoader::runInitializers(ImageLoader::LinkCont ext const&

+ 57
6 dyld 0x8fe02202 dyld::runInitializers(ImageLoader*) + 34
7 dyld 0x8fe0bbdd dlopen + 605
8 libSystem.B.dylib 0x924062c2 dlopen + 66
9 com.apple.CoreFoundation 0x904cb403 _CFBundleDlfcnLoadBundle + 307
10 com.apple.CoreFoundation 0x904cbd27 _CFBundleLoadExecutableAndReturnError + 567
11 com.apple.Foundation 0x9556f1d3 _NSBundleLoadCode + 259
12 com.apple.Foundation 0x9556e93b -[NSBundle loadAndReturnError:] + 331
13 com.apple.Foundation 0x9556e7ea -[NSBundle load] + 42
14 com.apple.Foundation 0x9556e7ad -[NSBundle principalClass] + 45
15 com.apple.AppKit 0x91b575a5 -[NSInputManager _loadBundle] + 137
16 com.apple.AppKit 0x91b56d42 -[NSInputManager initWithName:host:] + 2639
17 com.apple.AppKit 0x916aee7f +[NSInputManager initialize] + 1134
18 libobjc.A.dylib 0x95e088b8 _class_initialize + 367
19 libobjc.A.dylib 0x95e07239 _class_lookupMethodAndLoadCache + 81
20 libobjc.A.dylib 0x95e176d6 objc_msgSend + 102
21 com.apple.AppKit 0x916adcd7 -[NSApplication run] + 83
22 com.apple.AppKit 0x9167b1d8 NSApplicationMain + 574
23 com.apple.Safari 0x00002c92 0x1000 + 7314