On 2015-11-26 09:27, René J.V. Bertin wrote:
There's something I don't really understand though: the exact same question you asked above. What's the difference between starting kwrite directly on the commandline (or through execve()), and dlopen'ing it? Why does the code go through that on Linux? Whatever that difference is, it's probably the reason why the approach fails on OS X.
If I recall rightly, it's a speed thing. kdeinit pre-loads some libraries common across most KDE applications (eg: Qt5Core and Qt5Gui, which are reasonably large). fork()+dlopen() can then make direct use of these already-loaded libraries, whereas an exec() would have to reload/remap them all.
I think there's also possibly some memory-usage benefits from the fact that fork() gives you copy-on-write access to kdeinit's memory pages.
Alex _______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel