* thread_pthread.c (get_stack): fix memory leak; pthread_attr_destory
must be called even when pthread_getattr_np is used. [ruby-core:31269] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
203ebcbb92
commit
6e7f56fdc7
@ -1,3 +1,9 @@
|
|||||||
|
Thu Jul 22 20:12:56 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
|
* thread_pthread.c (get_stack): fix memory leak; pthread_attr_destory
|
||||||
|
must be called even when pthread_getattr_np is used.
|
||||||
|
[ruby-core:31269]
|
||||||
|
|
||||||
Thu Jul 22 16:27:41 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
Thu Jul 22 16:27:41 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* re.c (rb_reg_expr_str): fix broken Regexp#inspect when it
|
* re.c (rb_reg_expr_str): fix broken Regexp#inspect when it
|
||||||
|
@ -226,9 +226,7 @@ get_stack(void **addr, size_t *size)
|
|||||||
# endif
|
# endif
|
||||||
CHECK_ERR(pthread_attr_getguardsize(&attr, &guard));
|
CHECK_ERR(pthread_attr_getguardsize(&attr, &guard));
|
||||||
*size -= guard;
|
*size -= guard;
|
||||||
# ifndef HAVE_PTHREAD_GETATTR_NP
|
|
||||||
pthread_attr_destroy(&attr);
|
pthread_attr_destroy(&attr);
|
||||||
# endif
|
|
||||||
#elif defined HAVE_PTHREAD_GET_STACKADDR_NP && defined HAVE_PTHREAD_GET_STACKSIZE_NP
|
#elif defined HAVE_PTHREAD_GET_STACKADDR_NP && defined HAVE_PTHREAD_GET_STACKSIZE_NP
|
||||||
pthread_t th = pthread_self();
|
pthread_t th = pthread_self();
|
||||||
*addr = pthread_get_stackaddr_np(th);
|
*addr = pthread_get_stackaddr_np(th);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user