Re: GhostScript/GhostView ??

I guess any success in reducing the memory requirements is balanced with

> more features (some of which are occasionally useful!).

Yes and no. If you're actually using all those features, yes, but in general I imagine only a single-digit percentage of all the code that makes up OO or MSO is actually being executed during a typical editing session, and thus the rest can be swapped out to the page file is "real" memory is needed for other tasks. I'm not sure of the granularity of swapping in Windows vs. Linux though -- whether it's page by page (4kB on a x86 CPU) or more like DLL by DLL (or whatever the Linux equivalent is).

Reply to
Joel Kolstad
Loading thread data ...

My question is why doesn't an application load those seldom used features at the time they are actually called instead of on start-up?

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

I suspect the "official" answer is that it would be (significant, for something the size of MSO/OO) extra work for the programmer, with the only significant benefit that program start-up would be faster (since "swapping out when not needed" is effectively the same thing as "loading only when needed," and I believe the OS does the "swapping out" at a much finer level of granularity than programmers would typically tend to "load in").

This isn't the "productivity" thread, but when judging programmer productivitiy things like "memory usage" and "start-up time" seem to fall pretty far down the list relative to "able to ship on schedule" and "reasonably bug-free."

Reply to
Joel Kolstad

Yeah, I know.

I wish universities would breed more embedded guys. They've got their priorities right, usually. But of course that's much harder than minting programmers. Just like it seems too hard to produce enough board level analog folks, or any at all.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

Binaries (executables and DLLs/DSOs) are cached at page granularity.

Code is mapped read-only, so it doesn't actually get "swapped" as such (similarly for read-only data, e.g. string literals). Rather, the OS simply releases the page for re-use, and reloads the code from the binary if it is subsequently required. IOW, binaries act as their own "swap" files.

Actual swap files/partitions are used for mutable data which wouldn't otherwise exist in any file, i.e. the stack, the heap, and any pages from the data and BSS segments which have been modified (unmodified pages will be discarded, and reloaded from the binary if needed).

Reply to
Nobody

The granularity of swapping is a 4K page on both Windows and Linux, I believe. How well an application works with swapping will vary - if features are well separated in code then parts can be successfully swapped out without affecting the real running speed of the application.

Reply to
David Brown

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.