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
f3975c5a
Commit
f3975c5a
authored
Dec 08, 2008
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskmgr: Replace malloc with HeapAlloc.
parent
50b45a78
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
23 additions
and
37 deletions
+23
-37
about.c
programs/taskmgr/about.c
+0
-1
affinity.c
programs/taskmgr/affinity.c
+0
-1
applpage.c
programs/taskmgr/applpage.c
+11
-9
column.c
programs/taskmgr/column.c
+0
-1
dbgchnl.c
programs/taskmgr/dbgchnl.c
+0
-1
debug.c
programs/taskmgr/debug.c
+0
-1
endproc.c
programs/taskmgr/endproc.c
+0
-1
graph.c
programs/taskmgr/graph.c
+0
-1
graphctl.c
programs/taskmgr/graphctl.c
+0
-1
optnmenu.c
programs/taskmgr/optnmenu.c
+0
-1
perfdata.c
programs/taskmgr/perfdata.c
+12
-12
perfpage.c
programs/taskmgr/perfpage.c
+0
-1
priority.c
programs/taskmgr/priority.c
+0
-1
proclist.c
programs/taskmgr/proclist.c
+0
-1
procpage.c
programs/taskmgr/procpage.c
+0
-1
run.c
programs/taskmgr/run.c
+0
-1
taskmgr.c
programs/taskmgr/taskmgr.c
+0
-1
trayicon.c
programs/taskmgr/trayicon.c
+0
-1
No files found.
programs/taskmgr/about.c
View file @
f3975c5a
...
...
@@ -25,7 +25,6 @@
#include <commctrl.h>
#include <stdlib.h>
#include <shellapi.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <stdio.h>
...
...
programs/taskmgr/affinity.c
View file @
f3975c5a
...
...
@@ -25,7 +25,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <winnt.h>
#include <stdio.h>
...
...
programs/taskmgr/applpage.c
View file @
f3975c5a
...
...
@@ -25,7 +25,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <stdio.h>
...
...
@@ -173,7 +172,7 @@ static void AddOrUpdateHwnd(HWND hWnd, WCHAR *wszTitle, HICON hIcon, BOOL bHung)
/* It is not already in the list so add it */
else
{
pAPLI
=
(
LPAPPLICATION_PAGE_LIST_ITEM
)
malloc
(
sizeof
(
APPLICATION_PAGE_LIST_ITEM
));
pAPLI
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
APPLICATION_PAGE_LIST_ITEM
));
pAPLI
->
hWnd
=
hWnd
;
pAPLI
->
hIcon
=
hIcon
;
...
...
@@ -212,7 +211,7 @@ static void AddOrUpdateHwnd(HWND hWnd, WCHAR *wszTitle, HICON hIcon, BOOL bHung)
ImageList_Remove
(
hImageListSmall
,
item
.
iItem
);
SendMessage
(
hApplicationPageListCtrl
,
LVM_DELETEITEM
,
item
.
iItem
,
0
);
free
(
pAPLI
);
HeapFree
(
GetProcessHeap
(),
0
,
pAPLI
);
bItemRemoved
=
TRUE
;
}
}
...
...
@@ -715,7 +714,8 @@ void ApplicationPage_OnWindowsTileHorizontally(void)
HWND
*
hWndArray
;
int
nWndCount
;
hWndArray
=
(
HWND
*
)
malloc
(
sizeof
(
HWND
)
*
ListView_GetItemCount
(
hApplicationPageListCtrl
));
hWndArray
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
HWND
)
*
ListView_GetItemCount
(
hApplicationPageListCtrl
));
nWndCount
=
0
;
for
(
i
=
0
;
i
<
ListView_GetItemCount
(
hApplicationPageListCtrl
);
i
++
)
{
...
...
@@ -735,7 +735,7 @@ void ApplicationPage_OnWindowsTileHorizontally(void)
}
}
TileWindows
(
NULL
,
MDITILE_HORIZONTAL
,
NULL
,
nWndCount
,
hWndArray
);
free
(
hWndArray
);
HeapFree
(
GetProcessHeap
(),
0
,
hWndArray
);
}
void
ApplicationPage_OnWindowsTileVertically
(
void
)
...
...
@@ -746,7 +746,8 @@ void ApplicationPage_OnWindowsTileVertically(void)
HWND
*
hWndArray
;
int
nWndCount
;
hWndArray
=
(
HWND
*
)
malloc
(
sizeof
(
HWND
)
*
ListView_GetItemCount
(
hApplicationPageListCtrl
));
hWndArray
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
HWND
)
*
ListView_GetItemCount
(
hApplicationPageListCtrl
));
nWndCount
=
0
;
for
(
i
=
0
;
i
<
ListView_GetItemCount
(
hApplicationPageListCtrl
);
i
++
)
{
...
...
@@ -766,7 +767,7 @@ void ApplicationPage_OnWindowsTileVertically(void)
}
TileWindows
(
NULL
,
MDITILE_VERTICAL
,
NULL
,
nWndCount
,
hWndArray
);
free
(
hWndArray
);
HeapFree
(
GetProcessHeap
(),
0
,
hWndArray
);
}
void
ApplicationPage_OnWindowsMinimize
(
void
)
...
...
@@ -819,7 +820,8 @@ void ApplicationPage_OnWindowsCascade(void)
HWND
*
hWndArray
;
int
nWndCount
;
hWndArray
=
(
HWND
*
)
malloc
(
sizeof
(
HWND
)
*
ListView_GetItemCount
(
hApplicationPageListCtrl
));
hWndArray
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
HWND
)
*
ListView_GetItemCount
(
hApplicationPageListCtrl
));
nWndCount
=
0
;
for
(
i
=
0
;
i
<
ListView_GetItemCount
(
hApplicationPageListCtrl
);
i
++
)
{
...
...
@@ -837,7 +839,7 @@ void ApplicationPage_OnWindowsCascade(void)
}
}
CascadeWindows
(
NULL
,
0
,
NULL
,
nWndCount
,
hWndArray
);
free
(
hWndArray
);
HeapFree
(
GetProcessHeap
(),
0
,
hWndArray
);
}
void
ApplicationPage_OnWindowsBringToFront
(
void
)
...
...
programs/taskmgr/column.c
View file @
f3975c5a
...
...
@@ -25,7 +25,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <stdio.h>
...
...
programs/taskmgr/dbgchnl.c
View file @
f3975c5a
...
...
@@ -26,7 +26,6 @@
#include <ctype.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <stdio.h>
#include <winnt.h>
...
...
programs/taskmgr/debug.c
View file @
f3975c5a
...
...
@@ -25,7 +25,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <stdio.h>
#include <winnt.h>
...
...
programs/taskmgr/endproc.c
View file @
f3975c5a
...
...
@@ -25,7 +25,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <stdio.h>
#include <winnt.h>
...
...
programs/taskmgr/graph.c
View file @
f3975c5a
...
...
@@ -25,7 +25,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <stdio.h>
#include <winnt.h>
...
...
programs/taskmgr/graphctl.c
View file @
f3975c5a
...
...
@@ -24,7 +24,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <stdio.h>
...
...
programs/taskmgr/optnmenu.c
View file @
f3975c5a
...
...
@@ -30,7 +30,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <stdio.h>
...
...
programs/taskmgr/perfdata.c
View file @
f3975c5a
...
...
@@ -24,7 +24,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <stdio.h>
...
...
@@ -122,10 +121,11 @@ void PerfDataRefresh(void)
return
;
/* Get processor time information */
SysProcessorTimeInfo
=
(
PSYSTEM_PROCESSORTIME_INFO
)
malloc
(
sizeof
(
SYSTEM_PROCESSORTIME_INFO
)
*
SystemBasicInfo
.
bKeNumberProcessors
);
SysProcessorTimeInfo
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
SYSTEM_PROCESSORTIME_INFO
)
*
SystemBasicInfo
.
bKeNumberProcessors
);
status
=
NtQuerySystemInformation
(
SystemProcessorTimeInformation
,
SysProcessorTimeInfo
,
sizeof
(
SYSTEM_PROCESSORTIME_INFO
)
*
SystemBasicInfo
.
bKeNumberProcessors
,
&
ulSize
);
if
(
status
!=
NO_ERROR
)
{
free
(
SysProcessorTimeInfo
);
HeapFree
(
GetProcessHeap
(),
0
,
SysProcessorTimeInfo
);
return
;
}
...
...
@@ -137,12 +137,12 @@ void PerfDataRefresh(void)
do
{
BufferSize
+=
0x10000
;
SysHandleInfoData
=
(
LPBYTE
)
malloc
(
BufferSize
);
SysHandleInfoData
=
HeapAlloc
(
GetProcessHeap
(),
0
,
BufferSize
);
status
=
NtQuerySystemInformation
(
SystemHandleInformation
,
SysHandleInfoData
,
BufferSize
,
&
ulSize
);
if
(
status
==
0xC0000004
/*STATUS_INFO_LENGTH_MISMATCH*/
)
{
free
(
SysHandleInfoData
);
HeapFree
(
GetProcessHeap
(),
0
,
SysHandleInfoData
);
}
}
while
(
status
==
0xC0000004
/*STATUS_INFO_LENGTH_MISMATCH*/
);
...
...
@@ -155,12 +155,12 @@ void PerfDataRefresh(void)
do
{
BufferSize
+=
0x10000
;
pBuffer
=
(
LPBYTE
)
malloc
(
BufferSize
);
pBuffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
BufferSize
);
status
=
NtQuerySystemInformation
(
SystemProcessInformation
,
pBuffer
,
BufferSize
,
&
ulSize
);
if
(
status
==
0xC0000004
/*STATUS_INFO_LENGTH_MISMATCH*/
)
{
free
(
pBuffer
);
HeapFree
(
GetProcessHeap
(),
0
,
pBuffer
);
}
}
while
(
status
==
0xC0000004
/*STATUS_INFO_LENGTH_MISMATCH*/
);
...
...
@@ -180,14 +180,14 @@ void PerfDataRefresh(void)
/*
* Save system processor time info
*/
free
(
SystemProcessorTimeInfo
);
HeapFree
(
GetProcessHeap
(),
0
,
SystemProcessorTimeInfo
);
SystemProcessorTimeInfo
=
SysProcessorTimeInfo
;
/*
* Save system handle info
*/
memcpy
(
&
SystemHandleInfo
,
SysHandleInfoData
,
sizeof
(
SYSTEM_HANDLE_INFORMATION
));
free
(
SysHandleInfoData
);
HeapFree
(
GetProcessHeap
(),
0
,
SysHandleInfoData
);
for
(
CurrentKernelTime
=
0
,
Idx
=
0
;
Idx
<
SystemBasicInfo
.
bKeNumberProcessors
;
Idx
++
)
{
CurrentKernelTime
+=
Li2Double
(
SystemProcessorTimeInfo
[
Idx
].
KernelTime
);
...
...
@@ -231,9 +231,9 @@ void PerfDataRefresh(void)
}
/* Now alloc a new PERFDATA array and fill in the data */
free
(
pPerfDataOld
);
HeapFree
(
GetProcessHeap
(),
0
,
pPerfDataOld
);
pPerfDataOld
=
pPerfData
;
pPerfData
=
(
PPERFDATA
)
malloc
(
sizeof
(
PERFDATA
)
*
ProcessCount
);
pPerfData
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
PERFDATA
)
*
ProcessCount
);
pSPI
=
(
PSYSTEM_PROCESS_INFORMATION
)
pBuffer
;
for
(
Idx
=
0
;
Idx
<
ProcessCount
;
Idx
++
)
{
/* Get the old perf data for this process (if any) */
...
...
@@ -321,7 +321,7 @@ int MultiByteToWideChar(
pPerfData
[
Idx
].
KernelTime
.
QuadPart
=
pSPI
->
KernelTime
.
QuadPart
;
pSPI
=
(
PSYSTEM_PROCESS_INFORMATION
)((
LPBYTE
)
pSPI
+
pSPI
->
RelativeOffset
);
}
free
(
pBuffer
);
HeapFree
(
GetProcessHeap
(),
0
,
pBuffer
);
LeaveCriticalSection
(
&
PerfDataCriticalSection
);
}
...
...
programs/taskmgr/perfpage.c
View file @
f3975c5a
...
...
@@ -25,7 +25,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <stdio.h>
#include <winnt.h>
...
...
programs/taskmgr/priority.c
View file @
f3975c5a
...
...
@@ -25,7 +25,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <stdio.h>
#include <winnt.h>
...
...
programs/taskmgr/proclist.c
View file @
f3975c5a
...
...
@@ -24,7 +24,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <stdio.h>
...
...
programs/taskmgr/procpage.c
View file @
f3975c5a
...
...
@@ -24,7 +24,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <stdio.h>
...
...
programs/taskmgr/run.c
View file @
f3975c5a
...
...
@@ -24,7 +24,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <stdio.h>
...
...
programs/taskmgr/taskmgr.c
View file @
f3975c5a
...
...
@@ -25,7 +25,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <stdio.h>
#include <winnt.h>
...
...
programs/taskmgr/trayicon.c
View file @
f3975c5a
...
...
@@ -24,7 +24,6 @@
#include <windows.h>
#include <commctrl.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <stdio.h>
#include <winnt.h>
...
...
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