Size of a function

jgh at miduet.UUCP jgh at miduet.UUCP
Sat Jan 24 05:19:50 AEST 1987


In article <609 at sdchema.sdchem.UUCP> tps at sdchemf.UUCP (Tom Stockfisch) writes:
>In article <2100 at brl-adm.ARPA> LINNDR%VUENGVAX.BITNET at wiscvm.wisc.edu writes:
>> ... there is no way currently defined in
>>C to get the size of a function, in any units. My immediate interest is
>>in telling what function an address belongs during run-time.
>>
>>It might be nice if sizeof(function_name) could be defined to return this
>>value.
>
>The trouble is that any such scheme will not be implementable on a machine
>with a segmented architecture.  On such a machine, different functions might
>not belong to the same address space, and thus pointers into each of them
>could not be meaningfully compared.  

I had a need to pass a copy of a function to another task. Sizeof( function )
would have been handy....

(That
should
put
the
cat
among
the
pigeons!)

(I don't speak for my employer)
Jeremy Harris	jgh at gec-mi-at.co.uk	...!mcvax!ukc!hrc63!miduet!jgh
-- 
Jeremy Harris	jgh at gec-mi-at.co.uk	...!mcvax!ukc!hrc63!miduet!jgh



More information about the Comp.lang.c mailing list