default random object?

grauzone none at example.net
Sat Feb 14 13:39:09 PST 2009


Derek Parnell wrote:
> On Sat, 14 Feb 2009 19:07:52 +0200, Yigal Chripun wrote:
> 
> 
>> I see.
>> Having 3 functions: malloc(), expand() and free() is indeed a very good 
>> design.
> 
> Unless you need to contract the allocated memory ;-) I believe that
> realloc() does expansions and contractions, no?

expand() could take a negative value!

I'm not sure though, what you guys are up to. The really bad thing about 
realloc() is error handling. How do you check for errors? You need some 
additional lines of code just to find out if (re-)allocation has failed.



More information about the Digitalmars-d mailing list