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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
021490b1
Commit
021490b1
authored
Aug 08, 2007
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of more mallocs
git-svn-id:
file:///svn/tokudb@96
c7de825b-a66e-492c-adef-691d508d4ae1
parent
37b9ab72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
newbrt/hashtable.c
newbrt/hashtable.c
+7
-7
No files found.
newbrt/hashtable.c
View file @
021490b1
...
@@ -122,9 +122,9 @@ int toku_hash_delete (HASHTABLE tab, const char *key, ITEMLEN keylen) {
...
@@ -122,9 +122,9 @@ int toku_hash_delete (HASHTABLE tab, const char *key, ITEMLEN keylen) {
assert
(
*
prev_ptr
==
he
);
assert
(
*
prev_ptr
==
he
);
*
prev_ptr
=
he
->
next
;
*
prev_ptr
=
he
->
next
;
//printf("Freeing %s %s\n", he->key, he->val);
//printf("Freeing %s %s\n", he->key, he->val);
toku_free
(
he
->
key
);
toku_free
_n
(
he
->
key
,
he
->
keylen
);
toku_free
(
he
->
val
);
toku_free
_n
(
he
->
val
,
he
->
vallen
);
toku_free
(
he
);
toku_free
_n
(
he
,
sizeof
(
*
he
)
);
tab
->
n_keys
--
;
tab
->
n_keys
--
;
if
((
tab
->
n_keys
*
4
<
tab
->
arraysize
)
&&
tab
->
arraysize
>
4
)
{
if
((
tab
->
n_keys
*
4
<
tab
->
arraysize
)
&&
tab
->
arraysize
>
4
)
{
...
@@ -199,9 +199,9 @@ static void hasheltlist_free (HASHELT elt) {
...
@@ -199,9 +199,9 @@ static void hasheltlist_free (HASHELT elt) {
if
(
elt
==
0
)
return
;
if
(
elt
==
0
)
return
;
else
{
else
{
hasheltlist_free
(
elt
->
next
);
hasheltlist_free
(
elt
->
next
);
toku_free
(
elt
->
key
);
toku_free
_n
(
elt
->
key
,
elt
->
keylen
);
toku_free
(
elt
->
val
);
toku_free
_n
(
elt
->
val
,
elt
->
vallen
);
toku_free
(
elt
);
toku_free
_n
(
elt
,
sizeof
(
*
elt
)
);
}
}
}
}
...
@@ -211,7 +211,7 @@ void toku_hashtable_free(HASHTABLE *tab) {
...
@@ -211,7 +211,7 @@ void toku_hashtable_free(HASHTABLE *tab) {
toku_hashtable_clear
(
*
tab
);
toku_hashtable_clear
(
*
tab
);
//printf("%s:%d free %p\n", __FILE__, __LINE__, tab);n
//printf("%s:%d free %p\n", __FILE__, __LINE__, tab);n
toku_free
((
*
tab
)
->
array
);
toku_free
((
*
tab
)
->
array
);
toku_free
(
*
tab
);
toku_free
_n
(
*
tab
,
sizeof
(
**
tab
)
);
*
tab
=
0
;
*
tab
=
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