Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
025b52d9
Commit
025b52d9
authored
Sep 11, 2002
by
Andriy Palamarchuk
Committed by
Alexandre Julliard
Sep 11, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A few more conformance tests for heap memory allocation.
parent
63709f07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
alloc.c
dlls/kernel/tests/alloc.c
+21
-0
No files found.
dlls/kernel/tests/alloc.c
View file @
025b52d9
...
...
@@ -54,6 +54,7 @@ static void test_Heap(void)
LPVOID
mem1
,
mem1a
,
mem3
;
UCHAR
*
mem2
,
*
mem2a
;
UINT
error
,
i
;
DWORD
dwSize
;
/* Retreive the page size for this system */
sysInfo
.
dwPageSize
=
0
;
...
...
@@ -147,6 +148,26 @@ static void test_Heap(void)
ok
(
HeapFree
(
heap
,(
DWORD
)
NULL
,
mem2
),
"HeapFree failed"
);
}
/* take just freed pointer */
if
(
mem1a
)
mem1
=
mem1a
;
/* try to free it one more time */
HeapFree
(
heap
,
0
,
mem1
);
dwSize
=
HeapSize
(
heap
,
0
,
mem1
);
ok
(
dwSize
==
0xFFFFFFFF
,
"The size"
);
/* 0-length buffer */
mem1
=
HeapAlloc
(
heap
,
0
,
0
);
ok
(
mem1
!=
NULL
,
"Reserved memory"
);
dwSize
=
HeapSize
(
heap
,
0
,
mem1
);
/* should work with 0-length buffer */
ok
((
dwSize
>=
0
)
&&
(
dwSize
<
0xFFFFFFFF
),
"The size of the 0-length buffer"
);
ok
(
HeapFree
(
heap
,
0
,
mem1
),
"Freed the 0-length buffer"
);
/* Check that HeapDestry works */
ok
(
HeapDestroy
(
heap
),
"HeapDestroy failed"
);
}
...
...
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