Re: [xml] Minor improvement possible



I blogged about the importance of adding const in order to get best results here: https://randomascii.wordpress.com/2017/01/08/add-a-const-here-delete-a-const-there/

Some of the post talks about a VC++ compiler bug - ignore that.

Note that having constant data in the read-only data segment is a best practice even for single-processing. It's not a huge advantage, but it is strictly better than having logically-const globals in the read/write data segment.

On Thu, Jan 5, 2017 at 3:00 PM, Bruce Dawson <brucedawson google com> wrote:
The constant array xmlUnicodeBlocks is not marked as 'const' so it ends up in the read/write data segment instead of the read-only data segment, which can lead to it becoming per-process private data instead of image-backed shared data.

A patch file (made in the context of Chrome, but it should be applicable to libxml2) is attached.

--
Bruce Dawson



--
Bruce Dawson


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]