Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
a2968c8f
Commit
a2968c8f
authored
May 15, 2007
by
Markus Amsler
Committed by
Alexandre Julliard
May 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Speed up pool_alloc. Patch by Eric Pouech.
parent
f94127f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
storage.c
dlls/dbghelp/storage.c
+7
-9
No files found.
dlls/dbghelp/storage.c
View file @
a2968c8f
...
...
@@ -73,30 +73,28 @@ void pool_destroy(struct pool* pool)
void
*
pool_alloc
(
struct
pool
*
pool
,
unsigned
len
)
{
struct
pool_arena
**
parena
;
struct
pool_arena
*
arena
;
void
*
ret
;
len
=
(
len
+
3
)
&
~
3
;
/* round up size on DWORD boundary */
assert
(
sizeof
(
struct
pool_arena
)
+
len
<=
pool
->
arena_size
&&
len
);
for
(
parena
=
&
pool
->
first
;
*
parena
;
parena
=
&
(
*
parena
)
->
next
)
for
(
arena
=
pool
->
first
;
arena
;
arena
=
arena
->
next
)
{
if
((
char
*
)
(
*
parena
)
+
pool
->
arena_size
-
(
*
parena
)
->
current
>=
len
)
if
((
char
*
)
arena
+
pool
->
arena_size
-
arena
->
current
>=
len
)
{
ret
=
(
*
parena
)
->
current
;
(
*
parena
)
->
current
+=
len
;
ret
=
arena
->
current
;
arena
->
current
+=
len
;
return
ret
;
}
}
arena
=
HeapAlloc
(
GetProcessHeap
(),
0
,
pool
->
arena_size
);
if
(
!
arena
)
{
FIXME
(
"OOM
\n
"
);
return
NULL
;}
*
parena
=
arena
;
ret
=
(
char
*
)
arena
+
sizeof
(
*
arena
);
arena
->
next
=
NULL
;
arena
->
next
=
pool
->
first
;
pool
->
first
=
arena
;
arena
->
current
=
(
char
*
)
ret
+
len
;
return
ret
;
}
...
...
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