From: matz@... (Yukihiro Matsumoto) Date: 2000-11-10T01:08:19+09:00 Subject: [ruby-talk:6194] Re: xmalloc(), xfree() Hi, In message "[ruby-talk:6192] Re: xmalloc(), xfree()" on 00/11/09, Mathieu Bouchard writes: |No-one replied. I'm trying again with another question: what do you think |is best: | | * leave malloc/free as-is, make ruby use xmalloc/xfree; Tell me the detail for this. | * make ruby use our own malloc/free; Do you mean re-implementing malloc/free by ourselves? I think it's too tough job to achieve time/space efficiency like system's own. I don't think it's worth it. | * leave things as they are now (disallows proper accounting of | malloc'ed memory, allocation optimization, etc) The point is whether accounting/optimization is worth replacing malloc/free. Or couldn't it be possible without replacing them? | * magical solution I always hope this one, always. ;-) |I want to add one feature to the allocator: | |size_t xmsize (void *ptr); |"returns the number of bytes allocated by the malloc |operation that returned ptr. might be larger than the size |originally asked for." Is this REALLY worth it? It might introduce potential crash by free()'ing xmalloc()'ed memory. I'm afraid to dream a nightmare. As for memory performance, we are working on generational garbage collector, which prototype is working. matz.