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
e883aeb3
Commit
e883aeb3
authored
Apr 19, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Cache the contents of one extended big block depot block.
parent
14a77db4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
storage32.c
dlls/ole32/storage32.c
+24
-3
storage32.h
dlls/ole32/storage32.h
+3
-0
No files found.
dlls/ole32/storage32.c
View file @
e883aeb3
...
...
@@ -2760,6 +2760,7 @@ static HRESULT StorageImpl_Construct(
* There is no block depot cached yet.
*/
This
->
indexBlockDepotCached
=
0xFFFFFFFF
;
This
->
indexExtBlockDepotCached
=
0xFFFFFFFF
;
/*
* Start searching for free blocks with block 0.
...
...
@@ -3134,17 +3135,32 @@ static ULONG Storage32Impl_GetExtDepotBlock(StorageImpl* This, ULONG depotIndex)
ULONG
extBlockOffset
=
numExtBlocks
%
depotBlocksPerExtBlock
;
ULONG
blockIndex
=
BLOCK_UNUSED
;
ULONG
extBlockIndex
;
BYTE
depotBuffer
[
MAX_BIG_BLOCK_SIZE
];
int
index
,
num_blocks
;
assert
(
depotIndex
>=
COUNT_BBDEPOTINHEADER
);
if
(
extBlockCount
>=
This
->
extBigBlockDepotCount
)
return
BLOCK_UNUSED
;
if
(
This
->
indexExtBlockDepotCached
!=
extBlockCount
)
{
extBlockIndex
=
This
->
extBigBlockDepotLocations
[
extBlockCount
];
if
(
extBlockIndex
!=
BLOCK_UNUSED
)
StorageImpl_ReadDWordFromBigBlock
(
This
,
extBlockIndex
,
extBlockOffset
*
sizeof
(
ULONG
),
&
blockIndex
);
StorageImpl_ReadBigBlock
(
This
,
extBlockIndex
,
depotBuffer
);
num_blocks
=
This
->
bigBlockSize
/
4
;
for
(
index
=
0
;
index
<
num_blocks
;
index
++
)
{
StorageUtl_ReadDWord
(
depotBuffer
,
index
*
sizeof
(
ULONG
),
&
blockIndex
);
This
->
extBlockDepotCached
[
index
]
=
blockIndex
;
}
This
->
indexExtBlockDepotCached
=
extBlockCount
;
}
blockIndex
=
This
->
extBlockDepotCached
[
extBlockOffset
];
return
blockIndex
;
}
...
...
@@ -3176,6 +3192,11 @@ static void Storage32Impl_SetExtDepotBlock(StorageImpl* This, ULONG depotIndex,
extBlockOffset
*
sizeof
(
ULONG
),
blockIndex
);
}
if
(
This
->
indexExtBlockDepotCached
==
extBlockCount
)
{
This
->
extBlockDepotCached
[
extBlockOffset
]
=
blockIndex
;
}
}
/******************************************************************************
...
...
dlls/ole32/storage32.h
View file @
e883aeb3
...
...
@@ -358,6 +358,9 @@ struct StorageImpl
ULONG
extBigBlockDepotCount
;
ULONG
bigBlockDepotStart
[
COUNT_BBDEPOTINHEADER
];
ULONG
extBlockDepotCached
[
MAX_BIG_BLOCK_SIZE
/
4
];
ULONG
indexExtBlockDepotCached
;
ULONG
blockDepotCached
[
MAX_BIG_BLOCK_SIZE
/
4
];
ULONG
indexBlockDepotCached
;
ULONG
prevFreeBlock
;
...
...
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