Ian Pilcher ian.pilcher@home.com writes:
Log message: Ian Pilcher ian.pilcher@home.com WINEPS: make built-in font data read-only
Unfortunately the data still isn't stored in read-only memory even though it is declared const, because the structures contain pointers that require relocation. Would it be possible to store offsets instead of pointers?
Alexandre Julliard wrote:
Ian Pilcher ian.pilcher@home.com writes:
Unfortunately the data still isn't stored in read-only memory even though it is declared const, because the structures contain pointers that require relocation. Would it be possible to store offsets instead of pointers?
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.
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?). Better to focus to eliminating unused data, which is probably more than 50% of what's there right now.
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?