Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
96412ee5
Commit
96412ee5
authored
Sep 04, 2008
by
Marcus Meissner
Committed by
Alexandre Julliard
Sep 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotate with allocation size attribute.
parent
980ffb8e
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
38 additions
and
26 deletions
+38
-26
comctl32.h
dlls/comctl32/comctl32.h
+2
-2
cdlg.h
dlls/comdlg32/cdlg.h
+1
-1
hhctrl.h
dlls/hhctrl.ocx/hhctrl.h
+4
-4
localspl_private.h
dlls/localspl/localspl_private.h
+1
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+4
-4
msipriv.h
dlls/msi/msipriv.h
+4
-0
typelib.c
dlls/oleaut32/typelib.c
+2
-0
editor.h
dlls/riched20/editor.h
+2
-2
objbase.h
include/objbase.h
+1
-1
rpcndr.h
include/rpcndr.h
+1
-1
shlobj.h
include/shlobj.h
+1
-1
winbase.h
include/winbase.h
+6
-6
wincrypt.h
include/wincrypt.h
+2
-2
winnt.h
include/winnt.h
+6
-0
winternl.h
include/winternl.h
+1
-1
No files found.
dlls/comctl32/comctl32.h
View file @
96412ee5
...
...
@@ -175,8 +175,8 @@ typedef struct
/* undocumented functions */
LPVOID
WINAPI
Alloc
(
DWORD
);
LPVOID
WINAPI
ReAlloc
(
LPVOID
,
DWORD
);
LPVOID
WINAPI
Alloc
(
DWORD
)
__WINE_ALLOC_SIZE
(
1
)
;
LPVOID
WINAPI
ReAlloc
(
LPVOID
,
DWORD
)
__WINE_ALLOC_SIZE
(
2
)
;
BOOL
WINAPI
Free
(
LPVOID
);
DWORD
WINAPI
GetSize
(
LPVOID
);
...
...
dlls/comdlg32/cdlg.h
View file @
96412ee5
...
...
@@ -30,7 +30,7 @@
extern
HINSTANCE
COMDLG32_hInstance
;
void
COMDLG32_SetCommDlgExtendedError
(
DWORD
err
);
LPVOID
COMDLG32_AllocMem
(
int
size
);
LPVOID
COMDLG32_AllocMem
(
int
size
)
__WINE_ALLOC_SIZE
(
1
)
;
/* handle<-handle16 conversion */
#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
...
...
dlls/hhctrl.ocx/hhctrl.h
View file @
96412ee5
...
...
@@ -141,22 +141,22 @@ BOOL NavigateToChm(HHInfo*,LPCWSTR,LPCWSTR);
/* memory allocation functions */
static
inline
void
*
heap_alloc
(
size_t
len
)
static
inline
void
__WINE_ALLOC_SIZE
(
1
)
*
heap_alloc
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
}
static
inline
void
*
heap_alloc_zero
(
size_t
len
)
static
inline
void
__WINE_ALLOC_SIZE
(
1
)
*
heap_alloc_zero
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
);
}
static
inline
void
*
heap_realloc
(
void
*
mem
,
size_t
len
)
static
inline
void
__WINE_ALLOC_SIZE
(
2
)
*
heap_realloc
(
void
*
mem
,
size_t
len
)
{
return
HeapReAlloc
(
GetProcessHeap
(),
0
,
mem
,
len
);
}
static
inline
void
*
heap_realloc_zero
(
void
*
mem
,
size_t
len
)
static
inline
void
__WINE_ALLOC_SIZE
(
2
)
*
heap_realloc_zero
(
void
*
mem
,
size_t
len
)
{
return
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
mem
,
len
);
}
...
...
dlls/localspl/localspl_private.h
View file @
96412ee5
...
...
@@ -51,7 +51,7 @@ extern HINSTANCE LOCALSPL_hInstance;
/* ## Memory allocation functions ## */
static
inline
void
*
heap_alloc
(
size_t
len
)
static
inline
void
__WINE_ALLOC_SIZE
(
1
)
*
heap_alloc
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
}
...
...
dlls/mshtml/mshtml_private.h
View file @
96412ee5
...
...
@@ -490,7 +490,7 @@ void hlink_frame_navigate(HTMLDocument*,IHlinkFrame*,LPCWSTR,nsIInputStream*,DWO
void
call_property_onchanged
(
ConnectionPoint
*
,
DISPID
);
HRESULT
call_set_active_object
(
IOleInPlaceUIWindow
*
,
IOleInPlaceActiveObject
*
);
void
*
nsalloc
(
size_t
);
void
*
nsalloc
(
size_t
)
__WINE_ALLOC_SIZE
(
1
)
;
void
nsfree
(
void
*
);
void
nsACString_Init
(
nsACString
*
,
const
char
*
);
...
...
@@ -654,17 +654,17 @@ extern LONG module_ref;
/* memory allocation functions */
static
inline
void
*
heap_alloc
(
size_t
len
)
static
inline
void
__WINE_ALLOC_SIZE
(
1
)
*
heap_alloc
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
}
static
inline
void
*
heap_alloc_zero
(
size_t
len
)
static
inline
void
__WINE_ALLOC_SIZE
(
1
)
*
heap_alloc_zero
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
);
}
static
inline
void
*
heap_realloc
(
void
*
mem
,
size_t
len
)
static
inline
void
__WINE_ALLOC_SIZE
(
2
)
*
heap_realloc
(
void
*
mem
,
size_t
len
)
{
return
HeapReAlloc
(
GetProcessHeap
(),
0
,
mem
,
len
);
}
...
...
dlls/msi/msipriv.h
View file @
96412ee5
...
...
@@ -1040,21 +1040,25 @@ extern const WCHAR cszRootDrive[];
extern
const
WCHAR
cszbs
[];
/* memory allocation macro functions */
static
void
*
msi_alloc
(
size_t
len
)
__WINE_ALLOC_SIZE
(
1
);
static
inline
void
*
msi_alloc
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
}
static
void
*
msi_alloc_zero
(
size_t
len
)
__WINE_ALLOC_SIZE
(
1
);
static
inline
void
*
msi_alloc_zero
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
);
}
static
void
*
msi_realloc
(
void
*
mem
,
size_t
len
)
__WINE_ALLOC_SIZE
(
2
);
static
inline
void
*
msi_realloc
(
void
*
mem
,
size_t
len
)
{
return
HeapReAlloc
(
GetProcessHeap
(),
0
,
mem
,
len
);
}
static
void
*
msi_realloc_zero
(
void
*
mem
,
size_t
len
)
__WINE_ALLOC_SIZE
(
2
);
static
inline
void
*
msi_realloc_zero
(
void
*
mem
,
size_t
len
)
{
return
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
mem
,
len
);
...
...
dlls/oleaut32/typelib.c
View file @
96412ee5
...
...
@@ -1357,6 +1357,8 @@ static void TLB_abort(void)
{
DebugBreak
();
}
static
void
*
TLB_Alloc
(
unsigned
size
)
__WINE_ALLOC_SIZE
(
1
);
static
void
*
TLB_Alloc
(
unsigned
size
)
{
void
*
ret
;
...
...
dlls/riched20/editor.h
View file @
96412ee5
...
...
@@ -23,7 +23,7 @@
extern
HANDLE
me_heap
;
static
inline
void
*
heap_alloc
(
size_t
len
)
static
inline
void
__WINE_ALLOC_SIZE
(
1
)
*
heap_alloc
(
size_t
len
)
{
return
HeapAlloc
(
me_heap
,
0
,
len
);
}
...
...
@@ -33,7 +33,7 @@ static inline BOOL heap_free( void *ptr )
return
HeapFree
(
me_heap
,
0
,
ptr
);
}
static
inline
void
*
heap_realloc
(
void
*
ptr
,
size_t
len
)
static
inline
void
__WINE_ALLOC_SIZE
(
2
)
*
heap_realloc
(
void
*
ptr
,
size_t
len
)
{
return
HeapReAlloc
(
me_heap
,
0
,
ptr
,
len
);
}
...
...
include/objbase.h
View file @
96412ee5
...
...
@@ -343,7 +343,7 @@ HRESULT WINAPI CoGetInstanceFromFile(COSERVERINFO* pServerInfo, CLSID* pClsid, I
HRESULT
WINAPI
CoGetInstanceFromIStorage
(
COSERVERINFO
*
pServerInfo
,
CLSID
*
pClsid
,
IUnknown
*
punkOuter
,
DWORD
dwClsCtx
,
IStorage
*
pstg
,
DWORD
dwCount
,
MULTI_QI
*
pResults
);
HRESULT
WINAPI
CoGetMalloc
(
DWORD
dwMemContext
,
LPMALLOC
*
lpMalloc
);
LPVOID
WINAPI
CoTaskMemAlloc
(
ULONG
size
);
LPVOID
WINAPI
CoTaskMemAlloc
(
ULONG
size
)
__WINE_ALLOC_SIZE
(
1
)
;
void
WINAPI
CoTaskMemFree
(
LPVOID
ptr
);
LPVOID
WINAPI
CoTaskMemRealloc
(
LPVOID
ptr
,
ULONG
size
);
...
...
include/rpcndr.h
View file @
96412ee5
...
...
@@ -652,7 +652,7 @@ RPCRTAPI LONG RPC_ENTRY
NdrDcomAsyncStubCall
(
struct
IRpcStubBuffer
*
pThis
,
struct
IRpcChannelBuffer
*
pChannel
,
PRPC_MESSAGE
pRpcMsg
,
DWORD
*
pdwStubPhase
);
RPCRTAPI
void
*
RPC_ENTRY
NdrAllocate
(
PMIDL_STUB_MESSAGE
pStubMsg
,
size_t
Len
);
NdrAllocate
(
PMIDL_STUB_MESSAGE
pStubMsg
,
size_t
Len
)
__WINE_ALLOC_SIZE
(
2
)
;
RPCRTAPI
void
RPC_ENTRY
NdrClearOutParameters
(
PMIDL_STUB_MESSAGE
pStubMsg
,
PFORMAT_STRING
pFormat
,
void
*
ArgAddr
);
...
...
include/shlobj.h
View file @
96412ee5
...
...
@@ -40,7 +40,7 @@ DECLARE_HANDLE(HPSXA);
#endif
UINT
WINAPI
SHAddFromPropSheetExtArray
(
HPSXA
,
LPFNADDPROPSHEETPAGE
,
LPARAM
);
LPVOID
WINAPI
SHAlloc
(
ULONG
);
LPVOID
WINAPI
SHAlloc
(
ULONG
)
__WINE_ALLOC_SIZE
(
1
)
;
HRESULT
WINAPI
SHCoCreateInstance
(
LPCWSTR
,
const
CLSID
*
,
IUnknown
*
,
REFIID
,
LPVOID
*
);
HPSXA
WINAPI
SHCreatePropSheetExtArray
(
HKEY
,
LPCWSTR
,
UINT
);
HPSXA
WINAPI
SHCreatePropSheetExtArrayEx
(
HKEY
,
LPCWSTR
,
UINT
,
IDataObject
*
);
...
...
include/winbase.h
View file @
96412ee5
...
...
@@ -1744,7 +1744,7 @@ WINBASEAPI UINT WINAPI GetWindowsDirectoryW(LPWSTR,UINT);
WINBASEAPI
ATOM
WINAPI
GlobalAddAtomA
(
LPCSTR
);
WINBASEAPI
ATOM
WINAPI
GlobalAddAtomW
(
LPCWSTR
);
#define GlobalAddAtom WINELIB_NAME_AW(GlobalAddAtom)
WINBASEAPI
HGLOBAL
WINAPI
GlobalAlloc
(
UINT
,
SIZE_T
);
WINBASEAPI
HGLOBAL
WINAPI
GlobalAlloc
(
UINT
,
SIZE_T
)
__WINE_ALLOC_SIZE
(
2
)
;
WINBASEAPI
SIZE_T
WINAPI
GlobalCompact
(
DWORD
);
WINBASEAPI
ATOM
WINAPI
GlobalDeleteAtom
(
ATOM
);
WINBASEAPI
ATOM
WINAPI
GlobalFindAtomA
(
LPCSTR
);
...
...
@@ -1760,20 +1760,20 @@ WINBASEAPI HGLOBAL WINAPI GlobalHandle(LPCVOID);
WINBASEAPI
LPVOID
WINAPI
GlobalLock
(
HGLOBAL
);
WINBASEAPI
VOID
WINAPI
GlobalMemoryStatus
(
LPMEMORYSTATUS
);
WINBASEAPI
BOOL
WINAPI
GlobalMemoryStatusEx
(
LPMEMORYSTATUSEX
);
WINBASEAPI
HGLOBAL
WINAPI
GlobalReAlloc
(
HGLOBAL
,
SIZE_T
,
UINT
);
WINBASEAPI
HGLOBAL
WINAPI
GlobalReAlloc
(
HGLOBAL
,
SIZE_T
,
UINT
)
__WINE_ALLOC_SIZE
(
3
)
;
WINBASEAPI
SIZE_T
WINAPI
GlobalSize
(
HGLOBAL
);
WINBASEAPI
VOID
WINAPI
GlobalUnfix
(
HGLOBAL
);
WINBASEAPI
BOOL
WINAPI
GlobalUnlock
(
HGLOBAL
);
WINBASEAPI
BOOL
WINAPI
GlobalUnWire
(
HGLOBAL
);
WINBASEAPI
LPVOID
WINAPI
GlobalWire
(
HGLOBAL
);
#define HasOverlappedCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
WINBASEAPI
LPVOID
WINAPI
HeapAlloc
(
HANDLE
,
DWORD
,
SIZE_T
);
WINBASEAPI
LPVOID
WINAPI
HeapAlloc
(
HANDLE
,
DWORD
,
SIZE_T
)
__WINE_ALLOC_SIZE
(
3
)
;
WINBASEAPI
SIZE_T
WINAPI
HeapCompact
(
HANDLE
,
DWORD
);
WINBASEAPI
HANDLE
WINAPI
HeapCreate
(
DWORD
,
SIZE_T
,
SIZE_T
);
WINBASEAPI
BOOL
WINAPI
HeapDestroy
(
HANDLE
);
WINBASEAPI
BOOL
WINAPI
HeapFree
(
HANDLE
,
DWORD
,
LPVOID
);
WINBASEAPI
BOOL
WINAPI
HeapLock
(
HANDLE
);
WINBASEAPI
LPVOID
WINAPI
HeapReAlloc
(
HANDLE
,
DWORD
,
LPVOID
,
SIZE_T
);
WINBASEAPI
LPVOID
WINAPI
HeapReAlloc
(
HANDLE
,
DWORD
,
LPVOID
,
SIZE_T
)
__WINE_ALLOC_SIZE
(
4
)
;
WINBASEAPI
BOOL
WINAPI
HeapQueryInformation
(
HANDLE
,
HEAP_INFORMATION_CLASS
,
PVOID
,
SIZE_T
,
PSIZE_T
);
WINBASEAPI
BOOL
WINAPI
HeapSetInformation
(
HANDLE
,
HEAP_INFORMATION_CLASS
,
PVOID
,
SIZE_T
);
WINBASEAPI
SIZE_T
WINAPI
HeapSize
(
HANDLE
,
DWORD
,
LPCVOID
);
...
...
@@ -1822,13 +1822,13 @@ WINBASEAPI HMODULE WINAPI LoadLibraryExW(LPCWSTR,HANDLE,DWORD);
#define LoadLibraryEx WINELIB_NAME_AW(LoadLibraryEx)
WINBASEAPI
HINSTANCE
WINAPI
LoadModule
(
LPCSTR
,
LPVOID
);
WINBASEAPI
HGLOBAL
WINAPI
LoadResource
(
HMODULE
,
HRSRC
);
WINBASEAPI
HLOCAL
WINAPI
LocalAlloc
(
UINT
,
SIZE_T
);
WINBASEAPI
HLOCAL
WINAPI
LocalAlloc
(
UINT
,
SIZE_T
)
__WINE_ALLOC_SIZE
(
2
)
;
WINBASEAPI
SIZE_T
WINAPI
LocalCompact
(
UINT
);
WINBASEAPI
UINT
WINAPI
LocalFlags
(
HLOCAL
);
WINBASEAPI
HLOCAL
WINAPI
LocalFree
(
HLOCAL
);
WINBASEAPI
HLOCAL
WINAPI
LocalHandle
(
LPCVOID
);
WINBASEAPI
LPVOID
WINAPI
LocalLock
(
HLOCAL
);
WINBASEAPI
HLOCAL
WINAPI
LocalReAlloc
(
HLOCAL
,
SIZE_T
,
UINT
);
WINBASEAPI
HLOCAL
WINAPI
LocalReAlloc
(
HLOCAL
,
SIZE_T
,
UINT
)
__WINE_ALLOC_SIZE
(
3
)
;
WINBASEAPI
SIZE_T
WINAPI
LocalShrink
(
HGLOBAL
,
UINT
);
WINBASEAPI
SIZE_T
WINAPI
LocalSize
(
HLOCAL
);
WINBASEAPI
BOOL
WINAPI
LocalUnlock
(
HLOCAL
);
...
...
include/wincrypt.h
View file @
96412ee5
...
...
@@ -3806,8 +3806,8 @@ WINADVAPI BOOL WINAPI CryptVerifySignatureW (HCRYPTHASH, CONST BYTE *, DWORD, HC
#define CryptVerifySignature WINELIB_NAME_AW(CryptVerifySignature)
/* crypt32.dll functions */
LPVOID
WINAPI
CryptMemAlloc
(
ULONG
cbSize
);
LPVOID
WINAPI
CryptMemRealloc
(
LPVOID
pv
,
ULONG
cbSize
);
LPVOID
WINAPI
CryptMemAlloc
(
ULONG
cbSize
)
__WINE_ALLOC_SIZE
(
1
)
;
LPVOID
WINAPI
CryptMemRealloc
(
LPVOID
pv
,
ULONG
cbSize
)
__WINE_ALLOC_SIZE
(
2
)
;
VOID
WINAPI
CryptMemFree
(
LPVOID
pv
);
BOOL
WINAPI
CryptBinaryToStringA
(
const
BYTE
*
pbBinary
,
...
...
include/winnt.h
View file @
96412ee5
...
...
@@ -162,6 +162,12 @@ extern "C" {
# define DECLSPEC_HIDDEN
#endif
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
#define __WINE_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
#else
#define __WINE_ALLOC_SIZE(x)
#endif
/* Anonymous union/struct handling */
#ifndef NONAMELESSSTRUCT
...
...
include/winternl.h
View file @
96412ee5
...
...
@@ -2094,7 +2094,7 @@ NTSYSAPI PVOID WINAPI RtlAddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTI
NTSYSAPI
NTSTATUS
WINAPI
RtlAdjustPrivilege
(
ULONG
,
BOOLEAN
,
BOOLEAN
,
PBOOLEAN
);
NTSYSAPI
NTSTATUS
WINAPI
RtlAllocateAndInitializeSid
(
PSID_IDENTIFIER_AUTHORITY
,
BYTE
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
,
PSID
*
);
NTSYSAPI
RTL_HANDLE
*
WINAPI
RtlAllocateHandle
(
RTL_HANDLE_TABLE
*
,
ULONG
*
);
NTSYSAPI
PVOID
WINAPI
RtlAllocateHeap
(
HANDLE
,
ULONG
,
SIZE_T
);
NTSYSAPI
PVOID
WINAPI
RtlAllocateHeap
(
HANDLE
,
ULONG
,
SIZE_T
)
__WINE_ALLOC_SIZE
(
3
)
;
NTSYSAPI
WCHAR
WINAPI
RtlAnsiCharToUnicodeChar
(
LPSTR
*
);
NTSYSAPI
DWORD
WINAPI
RtlAnsiStringToUnicodeSize
(
const
STRING
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlAnsiStringToUnicodeString
(
PUNICODE_STRING
,
PCANSI_STRING
,
BOOLEAN
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment