
| OTOH when you start using and reusing larger libraries, like | Gtk+, the waste accumulates, and it's possibly you don't need | to run too many GTK+HS programs before you see performance decrease | due to memory exhaustion. On Linux and probably most Unixes, the text and data segments of the executable are loaded page-by-page into memory on demand. So having a lot of unused junk in the executable doesn't necessarily increase the memory used, either real memory or swap space. I think it's basically harmless providing you're only running one instance of the program on the machine. J

"Julian Seward (Intl Vendor)"
On Linux and probably most Unixes, the text and data segments of the executable are loaded page-by-page into memory on demand. So having a lot of unused junk in the executable doesn't necessarily increase the memory used, either real memory or swap space.
(Surely not swap, since code is just paged from the executable image :-) Surely the executable itself is only linked with the functions that are actually used by the program? Or are you talking about working set? I'd expect a GUI library to have considerable initialization etc. code, which is used relatively rarely. In that case, the waste is mostly disk space, which is abundant these days. My thought was, however, that the GUI toolkit is probably used by multiple other (non-haskell) programs, and could be usefully shared.
I think it's basically harmless providing you're only running one instance of the program on the machine.
Uh, multiple instances would share the executable in memory, if I understand things correctly. -kzm -- If I haven't seen further, it is by standing in the footprints of giants
participants (2)
-
Julian Seward (Intl Vendor)
-
Ketil Malde