From: Bill Clagett Date: 2002-05-02T09:23:52+09:00 Subject: Re: some questions about rb_newobj() I spend a lot of time in environments with no virtual memory or with limited backing store. So I really appreciate it when people don't assume that memory is infinite. billl ----- Original Message ----- From: "Dennis Newbold" To: "ruby-talk ML" Sent: Wednesday, May 01, 2002 4:53 PM Subject: Re: some questions about rb_newobj() > On Wed, 1 May 2002, Yukihiro Matsumoto wrote: > > > > > |Is it possible for this function to raise an exception? (It's desirable > > |that it can't since that would mean that Data_Wrap_Struct can't raise > > |either, which makes my job as an extension writer easier). > > > > Unfortunately it may raise an exception when there's no memory left. > > > > matz. > I'm a bit confused by the concept of "no memory left". On Windows > and all the variants of Unix that I'm aware of, the OS provides each > process with a multi-gigabyte, (an don some systems, terabyte) virtual > address space, supported by a swap file or swap partition. If malloc() > runs out or room on the heap it just calls brk() or sbrk() (I forget > which) to get some more. Under such circumstances, I find it difficult to > imagine a real-world scenario which would result in an "out of memory" > error condition. Am I missing something here? Or does Ruby have an > artificial internal limit on the amount of memory it can work with? > Perhaps due to the implementation of the garbage collector, or something? > If there is such a limitation, can you tell me what it is? Thanks. > > Dennis > >