summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-10 04:56:32 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-10 04:56:32 +0000
commitfa7bf880b4f351cd99978f7d096510aad137ca18 (patch)
treeca24c4eb3cc137ec42a67e9fd3567c20b77643b3 /vm_core.h
parent3d3a0d88c9fe73b911f0a0ba2a96b771740b48db (diff)
* vm_trace.c (postponed_job): use preallocated buffer.
Pre-allocate MAX_POSTPONED_JOB (1024) sized buffer and use it. If rb_postponed_job_register() cause overflow, simply it fails and returns 0. And maybe rb_postponed_job_register() is signal safe. * vm_core.h: change data structure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/vm_core.h b/vm_core.h
index 4c6e3c250c..8510e1688a 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -389,7 +389,9 @@ typedef struct rb_vm_struct {
/* hook */
rb_hook_list_t event_hooks;
- struct rb_postponed_job_struct *postponed_job;
+ /* postponed_job */
+ struct rb_postponed_job_struct *postponed_job_buffer;
+ int postponed_job_index;
int src_encoding_index;