Shrinking with realloc

Walter Bright bright at Data-IO.COM
Sat Aug 12 04:53:33 AEST 1989


In article <26362 at shemp.CS.UCLA.EDU> signup at cs.ucla.edu writes:
<I guess what I'd want is a no_move_realloc that returns
<NULL if it can't do the realloc in place, leaving the area allocated.
<It seems easy to provide; was it ever considered?

Easy to provide is not the only criterion. Adding a function to the library
involves:
1.	Usefulness of the function.
2.	Difficulty of implementation.
3.	Impact on size and weight of manual.
4.	Desirability for backwards compatibility.
5.	Impact on size of provided libraries.

Lots of functions are easy to implement, but don't get implemented because
the utility is small. There are an infinite number of these, and stuffing
pages in the manual for all of them makes it hard to find the useful ones.

The C library is already very large. Adding functions shouldn't be done
unless there is a demonstrable significant need.

If it's easy to implement, why don't you simply write it and put it in
your personal version of the library? Most vendors supply library source
for this purpose.



More information about the Comp.std.c mailing list