itss: Replace malloc() with HeapAlloc()
Francois Gouget
fgouget at free.fr
Wed Feb 11 09:35:42 CST 2009
On Tue, 10 Feb 2009, Andrew Talbot wrote:
[...]
> There are also many calls to realloc() - a function with complexities of its
> own - and other functions with "realloc" in their name.
Good point. Here are the ones I noticed:
dlls/rsaenh/mpi.c:3668: if ((tmp = realloc (a->dp, sizeof (mp_digit) * a->used)) == NULL) {
dlls/rsaenh/mpi.c:72: tmp = realloc (a->dp, sizeof (mp_digit) * size);
dlls/twain_32/dsm_ctrl.c:87: devices = realloc(devices, sizeof(devices[0])*(nrdevices+1));
dlls/advapi32/tests/registry.c:55: if ((ret = realloc( list[idx], size ))) list[idx] = ret;
dlls/ddraw/tests/ddrawmodes.c:97: modes = realloc(modes, (modes_size *= 2) * sizeof(DDSURFACEDESC));
dlls/mstask/tests/task.c:41: if ((ret = realloc(list[idx], size)))
dlls/oleaut32/tests/tmarshal.c:59: if ((ret = realloc( list[idx], size ))) list[idx] = ret;
dlls/userenv/tests/userenv.c:54: if ((ret = realloc( list[idx], size ))) list[idx] = ret;
And we even have two calls to calloc()!
dlls/winedos/int33.c:267: MCALLDATA *data = calloc(1,sizeof(MCALLDATA));
dlls/winedos/devices.c:137: hdr_ptr = calloc(1,sizeof(void *)+extra);
--
Francois Gouget <fgouget at free.fr> http://fgouget.free.fr/
"Only wimps use tape backup: _real_ men just upload their important stuff on
ftp, and let the rest of the world mirror it ;)" -- Linus Torvalds
More information about the wine-devel
mailing list