diff options
author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-25 03:03:14 +0000 |
---|---|---|
committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-25 03:03:14 +0000 |
commit | 8e86a8789d7a82b6f389c7c9052ba250933fafcb (patch) | |
tree | 575ef0143266ff2f57b09fe0143e9a412b1fb27f /boehm-gc/include/new_gc_alloc.h | |
parent | 81aeb57750e78fcb33d69a741e75754851058883 (diff) | |
download | gcc-8e86a8789d7a82b6f389c7c9052ba250933fafcb.tar.gz |
Import Boehm GC version 6.6.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110204 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/include/new_gc_alloc.h')
-rw-r--r-- | boehm-gc/include/new_gc_alloc.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/boehm-gc/include/new_gc_alloc.h b/boehm-gc/include/new_gc_alloc.h index f2219b7732d..7546638c981 100644 --- a/boehm-gc/include/new_gc_alloc.h +++ b/boehm-gc/include/new_gc_alloc.h @@ -109,7 +109,7 @@ enum { GC_byte_alignment = 8 }; enum { GC_word_alignment = GC_byte_alignment/GC_bytes_per_word }; inline void * &GC_obj_link(void * p) -{ return *(void **)p; } +{ return *reinterpret_cast<void **>(p); } // Compute a number of words >= n+1 bytes. // The +1 allows for pointers one past the end. @@ -228,7 +228,7 @@ class single_client_gc_alloc_template { } else { flh = GC_objfreelist_ptr + nwords; GC_obj_link(p) = *flh; - memset((char *)p + GC_bytes_per_word, 0, + memset(reinterpret_cast<char *>(p) + GC_bytes_per_word, 0, GC_bytes_per_word * (nwords - 1)); *flh = p; GC_aux::GC_mem_recently_freed += nwords; @@ -352,9 +352,9 @@ class simple_alloc<T, alloc> { \ public: \ static T *allocate(size_t n) \ { return 0 == n? 0 : \ - (T*) alloc::ptr_free_allocate(n * sizeof (T)); } \ + reinterpret_cast<T*>(alloc::ptr_free_allocate(n * sizeof (T))); } \ static T *allocate(void) \ - { return (T*) alloc::ptr_free_allocate(sizeof (T)); } \ + { return reinterpret_cast<T*>(alloc::ptr_free_allocate(sizeof (T))); } \ static void deallocate(T *p, size_t n) \ { if (0 != n) alloc::ptr_free_deallocate(p, n * sizeof (T)); } \ static void deallocate(T *p) \ |