Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!princeton!allegra!alice!ark From: ark@alice.UUCP Newsgroups: comp.lang.c Subject: Re: Size of a function Message-ID: <6577@alice.uUCp> Date: Sun, 25-Jan-87 10:32:04 EST Article-I.D.: alice.6577 Posted: Sun Jan 25 10:32:04 1987 Date-Received: Mon, 26-Jan-87 02:27:11 EST References: <2100@brl-adm.ARPA> <609@sdchema.sdchem.UUCP> <500@gec-mi-at.co.uk> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 18 In article <500@gec-mi-at.co.uk>, jgh@gec-mi-at.co.uk (Jeremy Harris) writes: > I had a need to pass a copy of a function to another task. Sizeof( function ) > would have been handy.... Maybe yes, maybe no. You would also need: 1. A way of actually getting at the function text. 2. A guarantee that it was all contiguous. 3. Some way of getting the copy to work. The first is impossible on some architectures (such as the PDP-11). The third assumes that either your object code is self-relocating or you know how to relocate it somehow. All these things may indeed be useful, but it is clear that they would be a major addition to C. sizeof(function) isn't nearly enough.