Ian Pilcher ian.pilcher@home.com writes:
If all pointers have to be eliminated, I can't see any way to do it. In order for the code to have any kind of sanity, built-in font metrics and dynamically loaded font metrics have to use the same data model, and I don't think it's even remotely practical to get rid of the pointers in the case of the dynamically loaded metrics.
Well, if it's not feasible so be it. But if it's at all possible I think it's worth some reasonable amount of trouble.
I'm open to suggestions, but I think that the effort involved in doing this (assuming a sane way could be found) probably far outweighs the benefit (less swap usage if the data is paged out; is there any other benefit?).
The main benefit is sharing between processes; so if you have 10 processes that want to print you only have one copy of the font data in memory. Plus it gets loaded on-demand so data that isn't used doesn't need to be loaded from disk at all.
Just in case I get inspired, though, what tool/command are you using to determine read-only vs. read/write data sizes? Can I just go by what objdump says about .data and .rodata?
objdump is fine yes. size works too, though I seem to remember some versions not counting .rodata correctly.
Alexandre Julliard wrote:
Well, if it's not feasible so be it. But if it's at all possible I think it's worth some reasonable amount of trouble.
AFAICT, just about every part of the driver that deals with fonts would have to be rewritten to deal with two different data models. In addition to the up-front work, just imagine the maintenance nightmare!
I'll keep chewing on this. Suggestions are welcome!