[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    [PATCH] Mystery hang reduction -- clear new allocations
From:       mtewoodbury () gmail ! com
Date:       2014-10-30 6:09:22
Message-ID: 1414649362-17891-1-git-send-email-mtewoodbury () gmail ! com
[Download RAW message or body]

From: Max TenEyck Woodbury <max+git@mtew.isa-geek.net>

    I was getting mystery frozen processes that cleared when a total screen redraw \
was forced. This has been reported numerous times over several years.  It came and \
went with various releases. I have been getting it consistantly recently.  I had an \
idea that it might have something to do with partially uninitialized drawing data \
structures, so I started adding HEAP_ZERO_MEMORY flags in various places.  This \
particular set cleared the problem, at least for now...

diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c
index cf5378c..cf1c814 100644
--- a/dlls/wined3d/vertexdeclaration.c
+++ b/dlls/wined3d/vertexdeclaration.c
@@ -178,7 +178,8 @@ static HRESULT vertexdeclaration_init(struct \
wined3d_vertex_declaration *declara  declaration->parent = parent;
     declaration->parent_ops = parent_ops;
     declaration->device = device;
-    declaration->elements = HeapAlloc(GetProcessHeap(), 0, \
sizeof(*declaration->elements) * element_count); +    declaration->elements = \
HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, +            \
sizeof(*declaration->elements) * element_count);  if (!declaration->elements)
     {
         ERR("Failed to allocate elements memory.\n");
@@ -316,7 +317,7 @@ static unsigned int convert_fvf_to_declaration(const struct \
wined3d_gl_info *gl_  has_psize + has_diffuse + has_specular + num_textures;
 
     state.gl_info = gl_info;
-    state.elements = HeapAlloc(GetProcessHeap(), 0, size * sizeof(*state.elements));
+    state.elements = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size * \
sizeof(*state.elements));  if (!state.elements) return ~0U;
     state.offset = 0;
     state.idx = 0;
-- 
1.8.0.rc0.18.gf84667d


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic