Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9ba195cf
authored
Jan 29, 2015
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base_c: checked for memory leaks in tests
parent
ae9bab43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
base_c/test/alloc_test.cc
+6
-0
base_c/test/main.cc
+4
-0
No files found.
base_c/test/alloc_test.cc
View file @
9ba195cf
...
...
@@ -177,6 +177,12 @@ void AllocTest::TestMixedAllocs() {
expected
+=
(
1
+
1
)
*
EMBB_CACHE_LINE_SIZE
+
3
*
sizeof
(
size_t
)
-
1
;
#endif // else EMBB_DEBUG
PT_EXPECT_EQ
(
allocated
,
expected
);
embb_free
(
plain
);
embb_free_aligned
(
aligned
);
embb_free_aligned
(
cache_aligned
);
PT_EXPECT
(
embb_get_bytes_allocated
()
==
0
);
}
}
// namespace test
...
...
base_c/test/main.cc
View file @
9ba195cf
...
...
@@ -39,6 +39,8 @@
#include <embb/base/c/log.h>
#include <iostream>
#include <embb/base/c/memory_allocation.h>
PT_MAIN
(
"Base C"
)
{
embb_log_set_log_level
(
EMBB_LOG_LEVEL_WARNING
);
unsigned
int
max_threads
=
...
...
@@ -55,4 +57,6 @@ PT_MAIN("Base C") {
PT_RUN
(
embb
::
base
::
test
::
ConditionVarTest
);
PT_RUN
(
embb
::
base
::
test
::
ThreadTest
);
PT_RUN
(
embb
::
base
::
test
::
ThreadSpecificStorageTest
);
PT_EXPECT
(
embb_get_bytes_allocated
()
==
0
);
}
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