You cant get the size of a function mainly because you cant define to me
what you think a function is. (hint: think of the optimization process and
inline functions).

----------------------------------
Peace and love,
Tweety
[EMAIL PROTECTED] - [EMAIL PROTECTED]
YahooID: tweety_04_01

> -----Original Message-----
> From: Ananth [mailto:[EMAIL PROTECTED]
> Sent: Saturday, October 16, 2004 11:22 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [c-prog] size of could not been applied to a function
>
>
> I don't think it can be done.
> But I *think* MFC provides a way to specify the address where the
> program should run, i am NOT sure, just a vague recollection of
> reading somewhere. If this is true, then something like this would
> suit your purposes fine. You can then always load your
> program\functions in the faster memory.
>
> And why i don't think it can be done, i.e. c++ would not support
> moving function definitions (assuming this is even possible in the
> first place):
> what about vtable guys? assume you _somehow_ moved the function
> defintion to some other address, who would update the funtion
> addresses in the vtable? vtable is constructed at compile time
> remember.
>
> So me thinks this is a no-go :)
>
> cheers
> - ananth
>
>
> On Sat, 16 Oct 2004 14:35:18 -0700 (PDT), bassam al-sani,
> <[EMAIL PROTECTED]> wrote:
> > 
> >
> > OK, first it is very important to know the size of function
> in some critical
> > situation.
> > example: 1-in the TSR application you must calculate the size of the
> > function or the application,2- in the device driver
> software the OS have to
> > know the size of DD and every
> > function of it.
> > anyway, in c lang. i am not sure how to do.. but i will try
> > in ASSEMBLY it is very easy. you just make a label at the
> start of the
> > function, then
> > another label at the end of the function and tat give you
> the first location
> > address and the second give you the  the last location
> (don't care about the
> > location it may var.) you just need to know the size....
> and good luck for
> > all
> > recep yalman <[EMAIL PROTECTED]> wrote:
> > 
> > i want to celebrate the person who started this discussion. Is very
> > interesting. i tried but my compiler warned me that we can
> not apply sizeof
> > a function. if someone can compute size of a function, he
> or she is an
> > expert. please send me how you can accomplish it. thank you
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> > To unsubscribe, send a blank message to
> > <mailto:[EMAIL PROTECTED]>.
> >
> >
> >
> >
> >
> > 
> >
> >
> >  
> >
> >
> > Bassam Alsanie
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> >  To unsubscribe, send a blank message to
> > <mailto:[EMAIL PROTECTED]>.
> >
> > 
> > 
> >  Yahoo! Groups Sponsor
> > 
> >  ADVERTISEMENT
> > 
> > 
> >  ________________________________
> >  Yahoo! Groups Links
> > 
> > To visit your group on the web, go to:
> > http://groups.yahoo.com/group/c-prog/
> >  
> > To unsubscribe from this group, send an email to:
> > [EMAIL PROTECTED]
> >  
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
> Now with Pop-Up Blocker. Get it for free!
> http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/EbFolB/TM
> --------------------------------------------------------------
> ------~->
>
> To unsubscribe, send a blank message to
> <mailto:[EMAIL PROTECTED]>.
> Yahoo! Groups Links
>
>
>

>
>
>




To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=315388.5500238.6578046.3001176/D=groups/S=:HM/A=2372354/rand=557247825


Yahoo! Groups Links

Reply via email to