[webkit-reviews] review granted: [Bug 4086] fast_malloc should work on Windows : [Attachment 3033] Fixes fast_malloc for Windows

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Sun Jul 24 16:54:00 PDT 2005


Maciej Stachowiak <mjs at apple.com> has granted Justin Haygood
<justin at xiondigital.net>'s request for review:
Bug 4086: fast_malloc should work on Windows
http://bugzilla.opendarwin.org/show_bug.cgi?id=4086

Attachment 3033: Fixes fast_malloc for Windows
http://bugzilla.opendarwin.org/attachment.cgi?id=3033&action=edit

------- Additional Comments from Maciej Stachowiak <mjs at apple.com>
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.



More information about the webkit-reviews mailing list