[ruby-dev:28382] Re: bcc32 memory manager
From:
"H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Date:
2006-02-23 10:30:46 UTC
List:
ruby-dev #28382
山本です。
>いつもご苦労様です。
>>とりあえずコミットしておきます。これにより、C++Builder でビルドした
>>バイナリを配布するときは borlndmm.dll が別途必要になります。
>HEAD、1.8両方でしょうか?
>README.bcc32の方に記述してあると助かります。
こんな感じでしょうか。(小西さん、これが C++Builder6 でも動くか確かめ
てもらえませんか?10000.times { "" << "." * 529671; GC.start } が
クラッシュしなくなるはずなのですが。私の持っている bcc5.6.1 は C++BuilderX
から取った usebormm.lib のないものなので・・・)
Index: Makefile.sub
===================================================================
RCS file: /src/ruby/bcc32/Makefile.sub,v
retrieving revision 1.42.2.28
diff -u -w -b -p -r1.42.2.28 Makefile.sub
--- Makefile.sub 25 Oct 2005 17:00:01 -0000 1.42.2.28
+++ Makefile.sub 23 Feb 2006 10:05:40 -0000
@@ -125,7 +125,10 @@ RFLAGS = $(iconinc)
!ifndef EXTLIBS
EXTLIBS =
!endif
-LIBS = cw32i.lib import32.lib ws2_32.lib $(EXTLIBS)
+!ifndef MEMLIB
+MEMLIB =
+!endif
+LIBS = $(MEMLIB) cw32i.lib import32.lib ws2_32.lib $(EXTLIBS)
MISSING = acosh.obj crypt.obj erf.obj win32.obj
!ifndef STACK
Index: README.bcc32
===================================================================
RCS file: /src/ruby/bcc32/README.bcc32,v
retrieving revision 1.2.2.1
diff -u -w -b -p -r1.2.2.1 README.bcc32
--- README.bcc32 3 Aug 2005 13:29:08 -0000 1.2.2.1
+++ README.bcc32 23 Feb 2006 10:16:44 -0000
@@ -19,6 +19,14 @@
* byacc ((<URL:http://gnuwin32.sourceforge.net/packages/byacc.htm>))
* sed ((<URL:http://gnuwin32.sourceforge.net/packages/sed.htm>))
+(4) We strongly recommend to build ruby on C++Builder, to link following files.
+ * usebormm.lib
+ * memmgr.lib
+
+ RTL's internal memory manager cannot handle a memory block greater than 1MB,
+ so we should use borlndmm.dll instead.
+ 10000.times { "" << "." * 529671; GC.start } # crash
+
== How to compile and install
(1) Execute bcc32\configure.bat on your build directory.
@@ -48,6 +56,10 @@
If Ruby's version is `x.y.z', the ((|<MAJOR>|)) is `x' and the ((|<MINOR>|)) is `y'.
The ((|<PLATFORM>|)) is usually `(({i586-bccwin32}))'.
+(6) Requires dynamic RTL (cc3250.dll on C++Builder5) and borlndmm.dll (If built with
+ usebormm.lib) to use installed binary. These files are ordinary in bcc32's bin
+ directory.
+
== Icons
Any icon files(*.ico) in the build directory, directories specified with
Index: setup.mak
===================================================================
RCS file: /src/ruby/bcc32/setup.mak,v
retrieving revision 1.6.2.7
diff -u -w -b -p -r1.6.2.7 setup.mak
--- setup.mak 19 Apr 2005 22:28:28 -0000 1.6.2.7
+++ setup.mak 23 Feb 2006 06:28:41 -0000
@@ -54,6 +54,14 @@ EXTOUT = $(EXTOUT)
$(BANG)endif
!endif
|
+ @type > usebormm.bat &&|
+@echo off
+ilink32 -Gn -x usebormm.lib > nul
+if exist usebormm.tds echo MEMLIB = usebormm.lib
+|
+ @usebormm.bat >> $(MAKEFILE)
+ @del usebormm.*
+
@cpp32 -I$(srcdir) -DRUBY_EXTERN="//" -P- -o$(MAKEFILE) > nul &&|
\#include "version.h"
MAJOR = RUBY_VERSION_MAJOR
>># Borland が RTL 内部のメモリマネージャを fix した Free Compiler を
>># 出してくれればいいんですが、望み薄でしょう。
>>
>>http://www.vector.co.jp/soft/win95/util/se156538.html や
>>http://www.vector.co.jp/soft/win95/util/se324749.html でダウンロード
>>できるパッケージだと、元々含まれているのでこれにリンクすれば問題ないかと。
>>
>Borlandは開発環境を売却するみたいです。
>どうなるんでしょうか。不安です。
私は不安は感じないのですが・・・複雑な心境です。C++Builder は今でも native アプリ
を簡単に組む開発ツールとして便利に使っているのですが、C++Builder5 以降
アップグレードしてないんですよね。ruby の開発を通じて見つけたバグも上位
バージョンでも直ってないのは確認済みですし・・・