[#6363] Re: rescue clause affecting IO loop behavior — ts <decoux@...>

>>>>> "D" == David Alan Black <dblack@candle.superlink.net> writes:

17 messages 2000/11/14
[#6367] Re: rescue clause affecting IO loop behavior — David Alan Black <dblack@...> 2000/11/14

Hello again --

[#6582] best way to interleaf arrays? — David Alan Black <dblack@...>

Hello --

15 messages 2000/11/26

[#6646] RE: Array Intersect (&) question — Aleksi Niemel<aleksi.niemela@...>

Ross asked something about widely known and largely ignored language (on

23 messages 2000/11/29
[#6652] RE: Array Intersect (&) question — rpmohn@... (Ross Mohn) 2000/11/29

aleksi.niemela@cinnober.com (Aleksi Niemel) wrote in

[#6723] Re: Array Intersect (&) question — Mathieu Bouchard <matju@...> 2000/12/01

> >Use a hash. Here's code to do both and more. It assumes that

[#6656] printing/accessing arrays and hashes — raja@... (Raja S.)

I'm coming to Ruby with a Python & Common Lisp background.

24 messages 2000/11/30

[ruby-talk:6192] Re: xmalloc(), xfree()

From: Mathieu Bouchard <matju@...>
Date: 2000-11-09 06:20:37 UTC
List: ruby-talk #6192
> I'm currently trying to make changes to xmalloc/xrealloc/xfree. The
[...]

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;

	* make ruby use our own malloc/free;

	* leave things as they are now (disallows proper accounting of
	  malloc'ed memory, allocation optimization, etc)

	* magical solution



- the issue -

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."

My current implementation works by making all allocations bigger than
requested, transparently, by sizeof(size_t). I store the size in *ptr, and
return ptr+1 instead of ptr; I also do the inverse translations. But this
implies that you can't xfree(malloc(...)) nor free(xmalloc(...)).

matju


In This Thread