www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/12/21:15:14

From: "DeHackEd" <notgiven AT out DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <19981112170856 DOT 18464 DOT 00000989 AT ng-fi1 DOT aol DOT com>
Subject: Re: size of a function in memory
Lines: 30
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <3KL22.2159$vl4.1265858@tundra.ops.attcanada.net>
Date: Fri, 13 Nov 1998 01:14:39 GMT
NNTP-Posting-Host: 142.194.222.234
NNTP-Posting-Date: Fri, 13 Nov 1998 01:14:39 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Do you mean the size of a pointer to a function or the length of a function
based on it's size?

If you mean the total function size, use what Allegro does:

void yourfunction()
{
    // insert commands here
}

void end_of_function()
{
}

size = end_of_function - yourfunction;

Give or take a few overhead bytes.
--
"DeHackEd"

My Email address in the header is fake (spammers). Email me at this address:

http://www.geocities.com/cgi-bin/homestead/mail.pl?dehacked
ShogunTim wrote in message <19981112170856 DOT 18464 DOT 00000989 AT ng-fi1 DOT aol DOT com>...
>Does anyone know of a way to determine the size of a function within memory in
>C / C++? Basically how much memory a function is taking up.  Any help is
>appretiated.
>--------l- Shogun


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019