[#28290] [Oniguruma] Version 4.0.0 — "K.Kosako" <sndgk393@...>
まつもとさん、
7 messages
2006/02/02
[#28296] packing small Struct — Tanaka Akira <akr@...17n.org>
しばらく前に思い付いたのですが、メモリ消費を押さえるために、
5 messages
2006/02/04
[#28337] constant look up order in CVS HEAD — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
15 messages
2006/02/18
[#28338] Re: constant look up order in CVS HEAD
— Tanaka Akira <akr@...17n.org>
2006/02/19
In article <1140229116.805371.31930.nullmailer@x31.priv.netlab.jp>,
[#28341] Re: constant look up order in CVS HEAD
— GOTOU Yuuzou <gotoyuzo@...>
2006/02/19
In message <87lkw8xfay.fsf@m17n.org>,
[#28342] Re: constant look up order in CVS HEAD
— Yukihiro Matsumoto <matz@...>
2006/02/19
まつもと ゆきひろです
[#28347] Re: constant look up order in CVS HEAD
— Tanaka Akira <akr@...17n.org>
2006/02/20
In article <1140392909.403432.7587.nullmailer@x31.priv.netlab.jp>,
[#28348] Re: constant look up order in CVS HEAD
— Yukihiro Matsumoto <matz@...>
2006/02/20
まつもと ゆきひろです
[#28352] Re: constant look up order in CVS HEAD
— WATANABE Hirofumi <eban@...>
2006/02/20
わたなべです。
[#28360] ruby_1_8 broken? — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
7 messages
2006/02/21
[#28371] bcc32 make error on 1.9.0 — "Nebata" <tnebata@...>
ねばたです。
8 messages
2006/02/22
[#28372] Re: bcc32 make error on 1.9.0
— KIMURA Koichi <kimura.koichi@...>
2006/02/22
木村です。
[#28386] test/drb/drbtest.rb cause file missing error — arton <artonx@...>
artonです。
6 messages
2006/02/23
[#28389] Re: test/drb/drbtest.rb cause file missing error
— Yukihiro Matsumoto <matz@...>
2006/02/24
まつもと ゆきひろです
[#28396] ruby-1.8 cvs head and 64bit time_t — arton <artonx@...>
artonです。
7 messages
2006/02/26
[#28404] irb cannot parse /\^/ — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
8 messages
2006/02/27
[#28405] Re: irb cannot parse /\^/
— keiju@... (石塚圭樹)
2006/02/27
けいじゅ@いしつかです.
[ruby-dev:28383] Re: bcc32 memory manager
From:
"H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Date:
2006-02-23 13:39:14 UTC
List:
ruby-dev #28383
山本です。
>|>ちょっと試してみたのですが、単に下のようにしただけだと bcc32 では
>|>落ちますね・・・・ win32 だと動くんですけど。
>|
>|ああ、すみません。原因はこれですね。
>
>コミットするかどうかはおまかせします。よろしく。
#define で置き換えるのをやめてリンカまかせ(?)にしたら
free を -1 にする必要がなさそうなのですが、testrb drb が memory allocation failed
とか言って落ちます。うーん。(#define で置き換えても同じ)
dynamic RTL の使ってるメモリ関数までは置き換えできないので、その辺に原因があるの
かもしれません。
とりあえず borlndmm.dll を使うパッチを入れておきます。
E:\ruby-cvs\temp>testrb drb
E:/ruby-cvs/ruby_1_8/lib/drb/extservm.rb:67:in `initialize': failed to allocate
memory (NoMemoryError)
from E:/ruby-cvs/ruby_1_8/lib/drb/extservm.rb:67:in `invoke_thread'
from E:/ruby-cvs/ruby_1_8/lib/drb/extservm.rb:27:in `initialize'
from E:/ruby-cvs/ruby_1_8/test/drb/drbtest.rb:14
from ..\ruby_1_8\\test\drb/test_drb.rb:1
from E:/ruby-cvs/ruby_1_8/lib/test/unit/collector/dir.rb:83:in `collect_
file'
from E:/ruby-cvs/ruby_1_8/lib/test/unit/collector/dir.rb:66:in `recursiv
e_collect'
from E:/ruby-cvs/ruby_1_8/lib/test/unit/collector/dir.rb:51:in `recursiv
e_collect'
from E:/ruby-cvs/ruby_1_8/lib/test/unit/collector/dir.rb:26:in `collect'
from E:/ruby-cvs/ruby_1_8/lib/test/unit/autorunner.rb:67
from E:/ruby-cvs/ruby_1_8/lib/test/unit/autorunner.rb:198:in `run'
from ../ruby_1_8//bin/testrb:5
Index: win32.c
===================================================================
RCS file: /src/ruby/win32/win32.c,v
retrieving revision 1.103.2.43
diff -u -w -b -p -r1.103.2.43 win32.c
--- win32.c 14 Feb 2006 05:03:16 -0000 1.103.2.43
+++ win32.c 23 Feb 2006 12:45:29 -0000
@@ -3621,11 +3621,12 @@ rb_w32_isatty(int fd)
}
#endif
+#ifdef __BORLANDC__
+
//
// Fix bcc32's stdio bug
//
-#ifdef __BORLANDC__
static int
too_many_files()
{
@@ -3671,4 +3672,41 @@ rb_w32_fsopen(const char *path, const ch
}
return f;
}
+
+//
+// Workaround for bcc32 internal memory manager's bug
+//
+
+static inline void *
+check(void *p)
+{
+ if (!p) errno = ENOMEM;
+
+ return p;
+}
+
+void *
+malloc(size_t n)
+{
+ return check(HeapAlloc(GetProcessHeap(), 0, n));
+}
+
+void *
+calloc(size_t i, size_t n)
+{
+ return check(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, i * n));
+}
+
+void *
+realloc(void *p, size_t n)
+{
+ return check(HeapReAlloc(GetProcessHeap(), 0, p, n));
+}
+
+void
+free(void *p)
+{
+ HeapFree(GetProcessHeap(), 0, p);
+}
+
#endif