Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
88d5b76b
Commit
88d5b76b
authored
Jun 24, 2013
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#17 fix a memory leak
parent
3c9a0435
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
5 deletions
+7
-5
CTestCustom.cmake
CTestCustom.cmake
+2
-0
ft/logger.cc
ft/logger.cc
+2
-0
src/tests/openlimit17-locktree.cc
src/tests/openlimit17-locktree.cc
+1
-1
src/tests/openlimit17-metafiles.cc
src/tests/openlimit17-metafiles.cc
+0
-2
src/tests/openlimit17.cc
src/tests/openlimit17.cc
+2
-2
No files found.
CTestCustom.cmake
View file @
88d5b76b
...
@@ -29,6 +29,8 @@ list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE
...
@@ -29,6 +29,8 @@ list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE
ydb/loader-cleanup-test3.tdb
ydb/loader-cleanup-test3.tdb
ydb/loader-stress-test4.tdb
ydb/loader-stress-test4.tdb
ydb/maxsize-for-loader-B.tdb
ydb/maxsize-for-loader-B.tdb
ydb/openlimit17.tdb
ydb/openlimit17-locktree.tdb
ydb/preload-db-nested.tdb
ydb/preload-db-nested.tdb
ydb/stress-gc.tdb
ydb/stress-gc.tdb
ydb/stress-gc2.tdb
ydb/stress-gc2.tdb
...
...
ft/logger.cc
View file @
88d5b76b
...
@@ -300,6 +300,8 @@ toku_logger_open_rollback(TOKULOGGER logger, CACHETABLE cachetable, bool create)
...
@@ -300,6 +300,8 @@ toku_logger_open_rollback(TOKULOGGER logger, CACHETABLE cachetable, bool create)
bool
is_empty
;
bool
is_empty
;
is_empty
=
toku_ft_is_empty_fast
(
t
);
is_empty
=
toku_ft_is_empty_fast
(
t
);
assert
(
is_empty
);
assert
(
is_empty
);
}
else
{
toku_ft_handle_close
(
t
);
}
}
return
r
;
return
r
;
}
}
...
...
src/tests/openlimit17-locktree.cc
View file @
88d5b76b
...
@@ -140,7 +140,7 @@ int test_main (int argc __attribute__((__unused__)), char *const argv[] __attrib
...
@@ -140,7 +140,7 @@ int test_main (int argc __attribute__((__unused__)), char *const argv[] __attrib
for
(
int
i
=
0
;
i
<
N
;
i
++
)
{
for
(
int
i
=
0
;
i
<
N
;
i
++
)
{
dbs
[
i
]
=
NULL
;
dbs
[
i
]
=
NULL
;
}
}
bool
emfile_happened
=
false
;
bool
emfile_happened
=
false
;
// should happen since there are less than N unused file descriptors
for
(
int
i
=
0
;
i
<
N
;
i
++
)
{
for
(
int
i
=
0
;
i
<
N
;
i
++
)
{
r
=
db_create
(
&
dbs
[
i
],
env
,
0
);
r
=
db_create
(
&
dbs
[
i
],
env
,
0
);
assert
(
r
==
0
);
assert
(
r
==
0
);
...
...
src/tests/openlimit17-metafiles.cc
View file @
88d5b76b
...
@@ -109,11 +109,9 @@ int test_main (int argc __attribute__((__unused__)), char *const argv[] __attrib
...
@@ -109,11 +109,9 @@ int test_main (int argc __attribute__((__unused__)), char *const argv[] __attrib
r
=
env
->
close
(
env
,
0
);
r
=
env
->
close
(
env
,
0
);
assert
(
r
==
0
);
assert
(
r
==
0
);
struct
rlimit
nofile_limit
;
struct
rlimit
nofile_limit
;
r
=
getrlimit
(
RLIMIT_NOFILE
,
&
nofile_limit
);
r
=
getrlimit
(
RLIMIT_NOFILE
,
&
nofile_limit
);
assert
(
r
==
0
);
assert
(
r
==
0
);
const
int
N
=
100
;
const
int
N
=
100
;
nofile_limit
.
rlim_cur
=
N
;
nofile_limit
.
rlim_cur
=
N
;
r
=
setrlimit
(
RLIMIT_NOFILE
,
&
nofile_limit
);
r
=
setrlimit
(
RLIMIT_NOFILE
,
&
nofile_limit
);
...
...
src/tests/openlimit17.cc
View file @
88d5b76b
...
@@ -96,7 +96,7 @@ PATENT RIGHTS GRANT:
...
@@ -96,7 +96,7 @@ PATENT RIGHTS GRANT:
int
test_main
(
int
argc
__attribute__
((
__unused__
)),
char
*
const
argv
[]
__attribute__
((
__unused__
)))
{
int
test_main
(
int
argc
__attribute__
((
__unused__
)),
char
*
const
argv
[]
__attribute__
((
__unused__
)))
{
int
r
;
int
r
;
const
int
N
=
1
00
;
const
int
N
=
2
00
;
struct
rlimit
nofile_limit
=
{
N
,
N
};
struct
rlimit
nofile_limit
=
{
N
,
N
};
r
=
setrlimit
(
RLIMIT_NOFILE
,
&
nofile_limit
);
r
=
setrlimit
(
RLIMIT_NOFILE
,
&
nofile_limit
);
...
@@ -120,7 +120,7 @@ int test_main (int argc __attribute__((__unused__)), char *const argv[] __attrib
...
@@ -120,7 +120,7 @@ int test_main (int argc __attribute__((__unused__)), char *const argv[] __attrib
for
(
int
i
=
0
;
i
<
N
;
i
++
)
{
for
(
int
i
=
0
;
i
<
N
;
i
++
)
{
dbs
[
i
]
=
NULL
;
dbs
[
i
]
=
NULL
;
}
}
bool
emfile_happened
=
false
;
bool
emfile_happened
=
false
;
// should happen since there are less than N unused file descriptors
for
(
int
i
=
0
;
i
<
N
;
i
++
)
{
for
(
int
i
=
0
;
i
<
N
;
i
++
)
{
r
=
db_create
(
&
dbs
[
i
],
env
,
0
);
r
=
db_create
(
&
dbs
[
i
],
env
,
0
);
assert
(
r
==
0
);
assert
(
r
==
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