RE: [ntfsd] RE: C++ static memory: paged?> You can always tell in which segment your code/data is put by looking into .map file.
And you can use “dumpbin /headers” to verify the attributes of segments in actual driver image (if you have doubts).
– CCP
----- Original Message -----
From: Chtchetkine, Vladimir
To: File Systems Developers
Sent: Monday, November 26, 2001 9:53 AM
Subject: [ntfsd] RE: C++ static memory: paged?
You can always tell in which segment your code/data is put by looking into .map file.
Since you’re using D::W you’re working within MSDEV environment (right?) If so you can
turn on inline expansion in “Project Settings” dialog in “C/C++” tab, “Optimizations”
category. There is a drop-down box “Inline function expansion” that is set
(by default for the checked build) to “Disable”. Just set it to “Only __inline”.
Regards,
Vladimir
-----Original Message-----
From: Ralph Shnelvar [mailto:xxxxx@dos32.com]
Sent: Monday, November 26, 2001 9:07 AM
To: File Systems Developers
Subject: [ntfsd] RE: C++ static memory: paged?
Dear Vladamir:
On Mon, 26 Nov 2001 07:24:56 -0800, you wrote:
Use data_seg() pragma to explicitly tell the compiler in which segment you
>want your static data.
>I.e. data_seg(“PAGED”) will put your data in paged data segment,
>data_seg(“INIT”) - in init segment,
>data_seg() - in non-paged.
Yes, I know all that. What I want to know is how I can really tell.
Reason: With all the macros that I use, it is never clear who is doing what.
Thus, it would be nice if the linker (or whatever other utility I can use)
could tell me this.
Another important thing to remember with DriverWorks is inline methods in
>checked build (when optimization,
>including inline expansion is turned off). In this case compiler will put
>your inline methods into code segment
>in context of which those methods were first compiled. Couple of times I
>ended up with methods that were “wrongly”
>put in the INIT segment. So I usually turn on “inline function expansion for
>__inline” even for checked builds.
>Just a tip…
Now that was a USEFUL tip! Thanks!
What is the name of the switch that turns on “inline function expansion for
__inline”?
>Regards,
>
>Vladimir
Ralph
>-----Original Message-----
>From: Ralph Shnelvar [mailto:xxxxx@dos32.com]
>Sent: Monday, November 26, 2001 6:51 AM
>To: File Systems Developers
>Subject: [ntfsd] C++ static memory: paged?
>
>
>Dear all:
>
>Another really basic question.
>
>I’m using NuMega’s DriverWorks … thus I am compiling C++ code.
>
>How can I tell what type of memory is being used for static external
>storage? That is, does static external storage come from paged or non-paged
>pool?
>
>SHould this info be available on a link map? I vaguely remember that
>paged/nonpaged can be changed at runtime but I don’t remember where I saw
>that.
>
>What happens if I want to change the paged/nonpaged default type for a
>single variable?
>
>Ralph Shnelvar
>
>—
>You are currently subscribed to ntfsd as: xxxxx@Starbase.com
>To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>—
>You are currently subscribed to ntfsd as: xxxxx@dos32.com
>To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: xxxxx@Starbase.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: xxxxx@acm.org
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com