diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-12 07:41:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-12 07:41:10 +0000 |
commit | ff003008340f27d6f89d18882732dc0a4093d16d (patch) | |
tree | 190346fed3edd60aa012c84575ed7ebf72a08c45 /ruby_atomic.h | |
parent | 3963c09aedcbe423cb4590b8e47cd62ad2534f71 (diff) |
iseq.c: potential memory leak
* iseq.c (iseq_load): keep type_map to get rid of memory leak.
based on a patch by Eric Wong at [ruby-core:59699]. [Bug #9399]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby_atomic.h')
-rw-r--r-- | ruby_atomic.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ruby_atomic.h b/ruby_atomic.h index 69efbdc4c4..789efdc4ea 100644 --- a/ruby_atomic.h +++ b/ruby_atomic.h @@ -161,5 +161,10 @@ atomic_size_exchange(size_t *ptr, size_t val) # define ATOMIC_PTR_EXCHANGE(var, val) (void *)ATOMIC_SIZE_EXCHANGE(*(size_t *)&(var), (size_t)(val)) # endif #endif +#ifndef ATOMIC_PTR_CAS +# if SIZEOF_VOIDP == SIZEOF_SIZE_T +# define ATOMIC_PTR_CAS(var, oldval, val) (void *)ATOMIC_SIZE_CAS(*(size_t *)&(var), (size_t)(oldval), (size_t)(val)) +# endif +#endif #endif /* RUBY_ATOMIC_H */ |