]> granicus.if.org Git - gc/commitdiff
2008-02-29 Hans Boehm <Hans.Boehm@hp.com>
authorhboehm <hboehm>
Fri, 29 Feb 2008 20:06:36 +0000 (20:06 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:42 +0000 (21:06 +0400)
* pthread_support.c: Fix typo in comment.
* os_dep.c (GC_win32_get_mem): Add heap section only if
allocation succeeded.

ChangeLog
os_dep.c
pthread_support.c

index b47ebec9c9e3338f657efdd7145590bea7c9d146..67592f2553dcd91268fa3c02bf132615e3814f00 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-29  Hans Boehm <Hans.Boehm@hp.com>
+
+       * pthread_support.c: Fix typo in comment.
+       * os_dep.c (GC_win32_get_mem): Add heap section only if
+       allocation succeeded.
+
 2008-02-28  Hans Boehm <Hans.Boehm@hp.com>
 
        * malloc.c: (free replacement) Fix caller address space check.
index fbcd15d85a5bda3bd1131bc527a760e271e8315b..f40337565004d5068f9f92158c3f95d8eb2096ee 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -1953,7 +1953,7 @@ ptr_t GC_win32_get_mem(word bytes)
        /* If I read the documentation correctly, this can      */
        /* only happen if HBLKSIZE > 64k or not a power of 2.   */
     if (GC_n_heap_bases >= MAX_HEAP_SECTS) ABORT("Too many heap sections");
-    GC_heap_bases[GC_n_heap_bases++] = result;
+    if (0 != result) GC_heap_bases[GC_n_heap_bases++] = result;
     return(result);                      
 }
 
index b028be7fd33aa36714c94e47f7d7d0e35624d244..8ca1a3a6096f337857af600777148be83e45278a 100644 (file)
@@ -153,7 +153,7 @@ unsigned long GC_lock_holder = NO_THREAD;
 #if defined(GC_USE_DL_WRAP) || defined(GC_USE_DLOPEN_WRAP)
 /* Define GC_ functions as aliases for the plain ones, which will      */
 /* be intercepted.  This allows files which include gc.h, and hence    */
-/* generate referemces to the GC_ symbols, to see the right symbols.   */
+/* generate references to the GC_ symbols, to see the right symbols.   */
       int GC_pthread_create(pthread_t * t, const pthread_attr_t * a,
                         void * (* fn)(void *), void * arg) {
          return pthread_create(t, a, fn, arg);