Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2006

Tip: Looking for answers? Try searching our database.

Section attribute "K"?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vincent Fatica - 23 Jun 2006 21:35 GMT
The docs say:

    K    Cacheable        Marks the section as not cacheable

and

    specify /SECTION:.text,!K and DUMPBIN will reveal section
    characteristics, including "Not Cached."

There seems to be a contradiction.  Does "K" mark the section as cacheable
or not cacheable?
Signature

- Vince

Jeff Partch - 24 Jun 2006 00:25 GMT
> The docs say:
>
[quoted text clipped - 7 lines]
> There seems to be a contradiction.  Does "K" mark the section as cacheable
> or not cacheable?

I think the '!' negates the attribute. So K would be Cacheable and !K would
be NOT Cacheable.
Signature

Jeff Partch [VC++ MVP]

Vincent Fatica - 24 Jun 2006 00:47 GMT
>> The docs say:
>>
[quoted text clipped - 10 lines]
>I think the '!' negates the attribute. So K would be Cacheable and !K would
>be NOT Cacheable.

That's what seems to be the case.  So the table in the docs indicating:

    K ... Cacheable ... Marks the section as not cacheable

is wrong, eh?
Signature

- Vince

Jeff Partch - 24 Jun 2006 01:14 GMT
>>> The docs say:
>>>
[quoted text clipped - 18 lines]
>
> is wrong, eh?

Oh, I'm a bonehead -- I see what you're saying now. :) Whatever its trying
to mean, that 'not' has been part of the documentation since at least Oct
2001. I think they try to make it make sense with the...

"K [is] peculiar in that the section flag... that correspond to [it] [is] in
the negative sense. If you specify [K] on the .text section
(/SECTION:.text,K), there will be no difference ... when you run DUMPBIN
[because] it was already implicitly cached. To remove [it] specify ...
!K..."

...but it still sounds like an explanation of a snake swallowing its tail.

Signature

Jeff Partch [VC++ MVP]

Vincent Fatica - 24 Jun 2006 02:16 GMT
>> That's what seems to be the case.  So the table in the docs indicating:
>>
[quoted text clipped - 5 lines]
>to mean, that 'not' has been part of the documentation since at least Oct
>2001.

It's what you currently see online at MSDN:

MSDN Library > Development Tools and Languages > Visual Studio > Visual C++
> Building a C/C++ Program > C/C++ Building Reference > Linking > Linker
Options > /SECTION (Specify Section Attributes)
Signature

- Vince

Jeff Partch - 24 Jun 2006 02:54 GMT
>>> That's what seems to be the case.  So the table in the docs indicating:
>>>
[quoted text clipped - 7 lines]
>
> It's what you currently see online at MSDN:

I know. What I mean is it has said the same thing for ~5 years. While its
not impossible that its a typo or a mistake that's gone unnoticed for
half-a-decade and several linker versions, I suspect it is trying to say
something subtle with intent. The fact that all that gobbledygook about K
being peculiar has been added since then and now, indicates to me that
somebody has already said 'Huh?', and that the doc owner approved the 'not'
and then tried to make its intended meaning more clear. I'm not sure s/he
succeeded, because it still sounds backwards to me too. Of course, I'm only
a fry-cook and a self-confessed bonehead. :)
Signature

Jeff Partch [VC++ MVP]

Pavel A. - 24 Jun 2006 17:34 GMT
Since caching is an esoteric kernel mode thing, maybe the K attribute actually
is not handled by the loader, or handled in some not straightforward way.
Can the OP tell why he needs noncached memory (outside of kernel & device drivers context)?

Regards,
--PA

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.