[Top][All Lists]

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

pdumper memory allocation (new FIXME)

From: Paul Eggert
Subject: pdumper memory allocation (new FIXME)
Date: Thu, 31 Jan 2019 08:07:01 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

While making minor simplifications to src/pdumper.c I noticed that pdumper_load has a comment saying it should not call xmalloc, and yet it calls xstrdup which works by calling xmalloc. I added a FIXME to point out the inconsistency.

The call to xstrdup was added in 2019-01-26T10:08:address@hidden (a7974933dd818194de3c9387b95dbd122bcf506c), whose commit message says "Use xstrdup instead of strdup, as on MS-Windows the latter uses the wrong heap." I thought that with pdumper we no longer have a hybrid malloc with two heaps; we simply have the usual C heap. Is that not true in MS-Windows for some reason? I'm asking because if there are still multiple heaps with pdumper (either on MS-Windows or elsewhere), I suspect there will be similar problems elsewhere in the code.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]