[macruby-changes] [581] MacRuby/trunk/string.c
source_changes at macosforge.org
source_changes at macosforge.org
Mon Sep 8 14:02:01 PDT 2008
Revision: 581
http://trac.macosforge.org/projects/ruby/changeset/581
Author: lsansonetti at apple.com
Date: 2008-09-08 14:02:00 -0700 (Mon, 08 Sep 2008)
Log Message:
-----------
more GC hints, to make sure rdoc's rsize is constant
Modified Paths:
--------------
MacRuby/trunk/string.c
Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c 2008-09-08 21:01:28 UTC (rev 580)
+++ MacRuby/trunk/string.c 2008-09-08 21:02:00 UTC (rev 581)
@@ -413,6 +413,8 @@
CFMakeCollectable((CFTypeRef)dup);
+ rb_gc_malloc_increase(32 + (sizeof(UniChar) * RSTRING_LEN(dup)));
+
return dup;
}
@@ -822,6 +824,7 @@
data = (CFMutableDataRef)rb_str_cfdata2(str);
if (data != NULL) {
CFDataAppendBytes(data, (const UInt8 *)ptr, len);
+ rb_gc_malloc_increase(sizeof(UniChar) * len);
}
else {
long slen;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080908/fedc681a/attachment.html
More information about the macruby-changes
mailing list