Bug 4086

Summary: fast_malloc should work on Windows
Product: WebKit Reporter: Justin Haygood <jhaygood>
Component: JavaScriptCoreAssignee: Maciej Stachowiak <mjs>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-webkit, ian, webkit
Priority: P2    
Version: 420+   
Hardware: PC   
OS: Windows XP   
Bug Depends on:    
Bug Blocks: 3356    
Attachments:
Description Flags
Fixes fast_malloc for Windows mjs: review-

Justin Haygood
Reported 2005-07-20 15:21:22 PDT
fast_malloc should work on Windows. Patch to do so attached to this.
Attachments
Fixes fast_malloc for Windows (2.33 KB, patch)
2005-07-20 15:22 PDT, Justin Haygood
mjs: review-
Justin Haygood
Comment 1 2005-07-20 15:22:59 PDT
Created attachment 3033 [details] Fixes fast_malloc for Windows Fixes fast_malloc for Windows.
Justin Haygood
Comment 2 2005-07-20 15:23:44 PDT
Comment on attachment 3033 [details] Fixes fast_malloc for Windows Fixes fast_malloc for Windows
Maciej Stachowiak
Comment 3 2005-07-24 16:54:00 PDT
Comment on attachment 3033 [details] Fixes fast_malloc for Windows A couple of comments: +#if WIN32 +#include <assert.h> +#endif Seems like it would be better to include assert.h unconditionally, if it is truly needed. The extra conditional declaration of malloc_init_state seems wrong - wouldn't the definition of __STD_C fall into the proper code path already? +static void *sbrk (int size){ + + return sbrk((long)size); +} Why is this required? Any call passing an int should call through just fine to the version that takes a long. +#ifdef WIN32 +#define NDEBUG +#endif It's incorrect to define NDEBUG unconditionally on Windows. This should be based on whether the build is debug or release. Please addresse these comments and submit a new patch.
Note You need to log in before you can comment on or make changes to this bug.