get size of malloc'd object

J. Eric Roskos jer at peora.UUCP
Thu Jun 26 05:44:05 AEST 1986


> Yes, but I think there is a question whether you want to tell the user
> about 1. how much he ASKED for, or 2. how much happens to BE there...

The only portable value is how much he asked for.  If he got more than
that, it is just an artifact of the memory allocation scheme, which would
be implementation-dependent, and thus he shouldn't use it; allowing him to
know how much extra he really got is a step in the direction of promoting
him to use it, which would seem not to be a good idea.
-- 
E. Roskos



More information about the Comp.unix mailing list