delorie.com/archives/browse.cgi | search |
Message-Id: | <199708170025.KAA06148@rabble.uow.edu.au> |
Subject: | Re: Function Sizes |
To: | mike4148 AT aol DOT com (Mike4148) |
Date: | Sun, 17 Aug 1997 10:25:00 +1000 (EST) |
Cc: | djgpp AT delorie DOT com (DJGPP) |
In-Reply-To: | <19970816000800.UAA17924@ladder02.news.aol.com> from Mike4148 at "Aug 16, 97 00:08:27 am" |
From: | *** Brett *** <bporter AT rabble DOT uow DOT edu DOT au> |
MIME-Version: | 1.0 |
> Is there a function or keyword which can determine the size of an actual > function from a reference to it? I've tried sizeof(), but it returns the > size of the reference instead of the actual function. > The way to do it is to declare a "null" function directly after the one you want the size of, and then subtract the two pointers (I think). I _do_ know that I saw this in the FAQ - it related to locking code in protected mode. I believe Allegro also defines a macro that is very helpful for doing this. Brett -- Brett Porter bporter AT rabble DOT uow DOT edu DOT au (preferred) --- blp01 AT uow DOT edu DOT au http://www.geocities.com/CollegePark/Union/3596 - Humor Page http://www.geocities.com/SiliconValley/Park/7483 - Programming page http://rabble.uow.edu.au/people/bporter - Mysterious page - hidden links ;)
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |