Dan Kegel wrote:
Changelog: msi: remove limit on number of handles
handle.c | 30 +++++++++++++++++++++++------- msipriv.h | 1 - 2 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/dlls/msi/handle.c b/dlls/msi/handle.c index 1cd82b3..79664f5 100644 @@ -66,18 +67,29 @@ MSIHANDLE alloc_msihandle( MSIOBJECTHDR
EnterCriticalSection( &MSI_handle_cs );
- if (msihandletable == NULL)
- {
- /* start table off small to avoid hiding resize bugs */
msihandletable_size = 1;
Isn't this very small start value something to be used only for debugging while one writes the resizing code? For "production" I would use a value that is big enough to handle the common case (handles at least 50% of the real life cases). As the old MSIMAXHANDLES was good enough for a whole lot of programs i would define that as common case to save me work of finding what the common case is.
msihandletable = msi_alloc_zero(1*sizeof(msi_handle_info));
- }
bye michael
On 8/23/06, Michael Stefaniuc mstefani@redhat.com wrote:
/* start table off small to avoid hiding resize bugs */
msihandletable_size = 1;
Isn't this very small start value something to be used only for debugging while one writes the resizing code? For "production" I would use a value that is big enough to handle the common case (handles at least 50% of the real life cases).
OK, once wine hits 1.0 and is in production, let's go back and do that.
Seriously, what's the disadvantage to keeping the initial size small? The overhead of six realloc's is utterly insignificant, and there's a fairly good chance somebody will get the locking wrong in an update to that code, so making the reallocs happen in the common case is a *good* thing that will help guard against bugs. - Dan
"Dan Kegel" dank@kegel.com writes:
On 8/23/06, Michael Stefaniuc mstefani@redhat.com wrote:
/* start table off small to avoid hiding resize bugs */
msihandletable_size = 1;
Isn't this very small start value something to be used only for debugging while one writes the resizing code? For "production" I would use a value that is big enough to handle the common case (handles at least 50% of the real life cases).
OK, once wine hits 1.0 and is in production, let's go back and do that.
Nobody is going to remember to do that. It's OK to use 1 for testing, but once you have done that please go back to a more reasonable value.