urlmon: Wrap heap functions.

Lionel Debroux lionel_debroux at yahoo.fr
Mon Nov 26 06:11:54 CST 2007


> In Wine HeapAlloc gets wrapped in different places, each using a
> different name and even a different naming convention. This makes the
> code harder to understand for people that browse the code (people doing
> janitorial work) as they have to check every time if the function is yet
> another wrapper around HeapFree or if the function is doing more than
> that. And this makes it even harder for static code analyzing tools.
I second Michael on that.

A number of spurious entries previously in his list of potential issues
detected by Smatch
( http://people.redhat.com/mstefani/wine/smatch/bugs_all.html )
were due to the wrappers around HeapFree that the script wasn't yet
aware of.
Currently, the list of functions that allocate memory, in the
unfree_wine script, contains 33 entries. The list of functions that free
memory contains 34 entries.

> I therefore propose to standardize all the internal HeapAlloc wrappers
> to a common name and form, Something along the lines of:
> walloc()
> wzalloc()
> wrealloc()
> wzrealloc()
> wfree()
> It's short and concise and doesn't conflict with the Win32 API.
I like that solution.


Yahoo! Mail innove : interface hyper pratique, messenger intégré, couleurs - http://mail.yahoo.fr

More information about the wine-devel mailing list