{Heap,Global,Local,}ReAlloc status (take 2)

Michael Günnewig MichaelGuennewig at gmx.de
Tue Oct 14 05:57:00 CDT 2003


"Dimitrie O. Paun" <dpaun at rogers.com> writes:

> Hi folks,
>
> Oleg has been doing a lot of good work, and we are now
> down to 73 HeapReAlloc and 73 non-HeapReAlloc entries
> to review. I'm still not sure how the comctl32.ReAlloc()
> should behave, any help in getting that resolved would
> be highly appreciated.
>
> Here is the update list:

These are okay:
> ./dlls/avifil32/api.c:      pOptions->lpFormat = GlobalReAllocPtr(pOptions->lpFormat, size, GMEM_MOVEABLE);
> ./dlls/avifil32/api.c:		   (lpBuffer = GlobalReAllocPtr(lpBuffer, cbBuffer *= 2, GPTR)) != NULL);
> ./dlls/avifil32/api.c:		   (lpBuffer = GlobalReAllocPtr(lpBuffer, cbBuffer *= 2, GPTR)) != NULL);
> ./dlls/avifil32/api.c:		   (lpBuffer = GlobalReAllocPtr(lpBuffer, cbBuffer *= 2, GPTR)) != NULL);
> ./dlls/avifil32/extrachunk.c:    lp = (LPDWORD)GlobalReAllocPtr(extra->lp, extra->cb + size + 2 * sizeof(DWORD), GHND);
> ./dlls/avifil32/extrachunk.c:    lp = (LPDWORD)GlobalReAllocPtr(extra->lp, extra->cb + cb, GHND);
> ./dlls/avifil32/getframe.c:	This->lpInFormat = GlobalReAllocPtr(This->lpInFormat, This->cbInBuffer, 0);
> ./dlls/avifil32/getframe.c:	(LPBITMAPINFOHEADER)GlobalReAllocPtr(This->lpOutFormat, size, GMEM_MOVEABLE);
> ./dlls/avifil32/icmstream.c:       (LPBITMAPINFOHEADER)GlobalReAllocPtr(This->lpbiPrev,size,GMEM_MOVEABLE);
> ./dlls/avifil32/icmstream.c:      (LPBITMAPINFOHEADER)GlobalReAllocPtr(This->lpbiPrev,size,GMEM_MOVEABLE);
> ./dlls/avifil32/editstream.c:          GlobalReAllocPtr(This->pStreams, (This->nTableSize + 32) * sizeof(EditStreamTable), GMEM_SHARE|GHND);
> ./dlls/avifil32/editstream.c:    pEdit->pStreams = GlobalReAllocPtr(pEdit->pStreams, This->nStreams * sizeof(EditStreamTable),GMEM_SHARE|GHND);

These must be fixed because GlobalReAlloc under Win98SE doesn't
allocates memory when handle is NULL:
> ./dlls/avifil32/avifile.c:      This->idxFmtChanges = GlobalReAllocPtr(This->idxFmtChanges, This->nIdxFmtChanges * sizeof(AVIINDEXENTRY), GHND);
> ./dlls/avifil32/avifile.c:    This->idxFrames = GlobalReAllocPtr(This->idxFrames, This->nIdxFrames * sizeof(AVIINDEXENTRY), GHND);
> ./dlls/avifil32/avifile.c:	(LPDWORD)GlobalReAllocPtr(This->lpBuffer, max(size, This->sInfo.dwSuggestedBufferSize), GMEM_MOVEABLE);
> ./dlls/avifil32/acmstream.c:    This->acmStreamHdr.pbSrc = GlobalReAllocPtr(This->acmStreamHdr.pbSrc,
> ./dlls/avifil32/acmstream.c:    This->acmStreamHdr.pbDst = GlobalReAllocPtr(This->acmStreamHdr.pbDst,

Will make the above ones, was my mistake.


  Michael




More information about the wine-devel mailing list