Disable dlmalloc for exe loading for now.
authorMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Mon, 4 Oct 2010 22:39:02 +0000 (00:39 +0200)
committerMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Mon, 4 Oct 2010 22:39:02 +0000 (00:39 +0200)
loader/CMakeLists.txt
loader/ntdll_loader.c

index ea98eb5..a2502b0 100644 (file)
@@ -8,7 +8,7 @@ add_definitions(-DUSE_DL_PREFIX=1)
 \r
 add_executable(himemce himemce.c\r
   wine.h my_winternl.h compat.c\r
-  dlmalloc.h dlmalloc.c\r
+#  dlmalloc.h dlmalloc.c\r
   kernel32_kernel_private.h kernel32_process.c kernel32_module.c\r
   ntdll_error.c ntdll_loader.c ntdll_virtual.c\r
   server_protocol.h server_mapping.c)\r
index 8d6ba06..14e430c 100644 (file)
 \r
 #include <assert.h>\r
 \r
+#undef USE_DLMALLOC\r
+#ifdef USE_DLMALLOC\r
 #include "dlmalloc.h"\r
+#endif\r
+\r
 #include "wine.h"\r
 \r
 PIMAGE_NT_HEADERS MyRtlImageNtHeader(HMODULE hModule)\r
@@ -143,7 +147,9 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d
   SIZE_T protect_size = 0;\r
   DWORD protect_old;\r
 #endif\r
+#ifdef USE_DLMALLOC\r
   int iscoredll = 0;\r
+#endif\r
 \r
   thunk_list = get_rva( module, (DWORD)descr->FirstThunk );\r
   if (descr->OriginalFirstThunk)\r
@@ -153,8 +159,10 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d
 \r
   while (len && name[len-1] == ' ') len--;  /* remove trailing spaces */\r
 \r
+#ifdef USE_DLMALLOC\r
   if (! _stricmp (name, "coredll.dll"))\r
     iscoredll = 1;\r
+#endif\r
 \r
   if (len * sizeof(WCHAR) < sizeof(buffer))\r
     {\r
@@ -239,6 +247,7 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d
          //      thunk_list->u1.Function = (ULONG_PTR)find_ordinal_export( imp_mod, exports, exp_size,\r
          //                                                                ordinal - exports->Base, load_path );\r
 \r
+#ifdef USE_DLMALLOC\r
          if (iscoredll)\r
            {\r
 #define COREDLL_MALLOC 1041\r
@@ -258,6 +267,7 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d
                thunk_list->u1.Function = (PWORD)(ULONG_PTR)GetProcAddress (imp_mod, (void *) (ordinal & 0xffff));\r
            }\r
          else\r
+#endif\r
            thunk_list->u1.Function = (PDWORD)(ULONG_PTR)GetProcAddress (imp_mod, (void *) (ordinal & 0xffff));\r
 \r
          if (!thunk_list->u1.Function)\r
@@ -279,6 +289,7 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d
          //                                                              (const char*)pe_name->Name,\r
          //                                                              pe_name->Hint, load_path );\r
 \r
+#ifdef USE_DLMALLOC\r
          if (iscoredll)\r
            {\r
              if (! strcmp (symname, "malloc"))\r
@@ -293,6 +304,7 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d
                thunk_list->u1.Function = (PDWORD)(ULONG_PTR)GetProcAddressA (imp_mod, symname);\r
            }\r
          else\r
+#endif\r
            thunk_list->u1.Function = (PDWORD)(ULONG_PTR)GetProcAddressA (imp_mod, (const char*)pe_name->Name);\r
          if (!thunk_list->u1.Function)\r
             {\r