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
ac399b08
Commit
ac399b08
authored
Jun 18, 2014
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add small blocks heap tests.
parent
608605c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
heap.c
dlls/msvcrt/tests/heap.c
+44
-0
No files found.
dlls/msvcrt/tests/heap.c
View file @
ac399b08
...
...
@@ -413,6 +413,49 @@ static void test_aligned(void)
test_aligned_offset_realloc
(
256
,
128
,
64
,
112
);
}
static
void
test_sbheap
(
void
)
{
void
*
mem
;
int
threshold
;
if
(
sizeof
(
void
*
)
==
8
)
{
ok
(
!
_set_sbh_threshold
(
0
),
"_set_sbh_threshold succeeded
\n
"
);
ok
(
!
_set_sbh_threshold
(
1000
),
"_set_sbh_threshold succeeded
\n
"
);
return
;
}
mem
=
malloc
(
1
);
ok
(
mem
!=
NULL
,
"malloc failed
\n
"
);
ok
(
_set_sbh_threshold
(
1
),
"_set_sbh_threshold failed
\n
"
);
threshold
=
_get_sbh_threshold
();
ok
(
threshold
==
16
,
"threshold = %d
\n
"
,
threshold
);
ok
(
_set_sbh_threshold
(
8
),
"_set_sbh_threshold failed
\n
"
);
threshold
=
_get_sbh_threshold
();
ok
(
threshold
==
16
,
"threshold = %d
\n
"
,
threshold
);
ok
(
_set_sbh_threshold
(
1000
),
"_set_sbh_threshold failed
\n
"
);
threshold
=
_get_sbh_threshold
();
ok
(
threshold
==
1008
,
"threshold = %d
\n
"
,
threshold
);
free
(
mem
);
mem
=
malloc
(
1
);
ok
(
mem
!=
NULL
,
"malloc failed
\n
"
);
ok
(
!
((
UINT_PTR
)
mem
&
0xf
),
"incorrect alignement (%p)
\n
"
,
mem
);
mem
=
realloc
(
mem
,
10
);
ok
(
mem
!=
NULL
,
"realloc failed
\n
"
);
ok
(
!
((
UINT_PTR
)
mem
&
0xf
),
"incorrect alignement (%p)
\n
"
,
mem
);
ok
(
_set_sbh_threshold
(
0
),
"_set_sbh_threshold failed
\n
"
);
threshold
=
_get_sbh_threshold
();
ok
(
threshold
==
0
,
"threshold = %d
\n
"
,
threshold
);
free
(
mem
);
}
START_TEST
(
heap
)
{
void
*
mem
;
...
...
@@ -436,4 +479,5 @@ START_TEST(heap)
free
(
mem
);
test_aligned
();
test_sbheap
();
}
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