-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Eric Hodel wrote: >> Is there a limit on how many methods you can define for a module? > Only the amount of memory you have. > > 1,000,000 takes about 700MB on my powerbook. > 2,000,000 takes about 1.5GB on my powerbook. Ah, thank you. Now I am confident that my code is at fault. >> I'm getting a SystemStackError when defining three or more module >> methods using rb_define_module_function(). > > > Lets see your code then. The SystemStackError occurs at the third invocation of rb_define_module_function(): // register the VPI module RVPI__rModuleDef = rb_define_module("VPI"); rb_define_module_function( // first func RVPI__rModuleDef , "relay_verilog" , RVPI_rb_relay_verilog , 0 ); rb_define_module_function( // second func RVPI__rModuleDef , "register_task" , RVPI_rb_register_task , 1 ); rb_define_module_function( // third func RVPI__rModuleDef , "handle_by_name" , RVPI_rb_handle_by_name , 2 ); // FIXME: causes "stack level too deep (SystemStackError)" The above snippet is from line 25 of the file "src/RVPI.cin", which is available through either Subversion or ViewCVS: Subversion: svn checkout -r21 svn://rubyforge.org/var/svn/ruby-vpi/trunk ViewCVS: http://rubyforge.org/plugins/scmsvn/viewcvs.php/trunk/?root=ruby-vpi&pathrev=21 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFD96QvmV9O7RYnKMcRApMIAKCraPGTmP/5ZADzkkpmi71vUVxjnQCgkxtE SlUGEXNUUDMwnqgIJkRxjCY= =v+Qb -----END PGP SIGNATURE-----