Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9296025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:44:41+00:00 2026-06-18T21:44:41+00:00

In my recent project, a data structure like std::map is strongly demanded. However, the

  • 0

In my recent project, a data structure like std::map is strongly demanded. However, the default implementations of std::map use C++ exceptions, which is not allowed in Windows kernel.

I think it is hard to reinvent std::map in a short time without any bug or performance penalty. So, I want to know whether there exists a substitution of std::map in Windows kernel.

STLPort may be a candidate. But I don’t know how to extract its std::map only and disable C++ exceptions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T21:44:43+00:00Added an answer on June 18, 2026 at 9:44 pm

    C++ code in kernel mode has several (severe) limitations that precede the issues of not having (full) standard libraries.

    See http://msdn.microsoft.com/en-us/library/windows/hardware/gg487420.aspx

    Although it is not currently possible to provide a strict and testable definition of the “completely safe” subset of C++ for use in kernel-mode code, some useful guidelines are available for constructs that are usually safe and those that are usually not.

    And

    C++ Issues for Kernel-Mode Drivers

    Microsoft developers have discovered a number of areas where C++ presents particular problems for kernel-mode drivers.

    Code in Memory

    The most severe problem with using C++ for writing kernel-mode drivers is the
    management of memory pages, particularly code in memory, rather than data. It
    is important that large drivers be pageable, and paged code is not always in
    memory. All of the code that will be needed must be resident before the
    system enters a state in which paging cannot occur.

    The way the C++ compiler generates code for non-POD classes and templates
    makes it particularly difficult to know where all the code required to
    execute a function might go and thus difficult to make the code safely
    pageable. The compiler automatically generates code for at least the
    following objects. These objects are put “out of line,” and the developer has
    no direct control over the section in which they are inserted, which means
    they could happen to be paged out when needed.

    • Compiler-generated code such as constructors, destructors, casts, and
      assignment operators. (These can often be explicitly provided, but it
      requires taking care to recognize that they need to be provided.)
    • Adjustor thunks, used to convert between various classes in a hierarchy.
    • Virtual function thunks, used to implement calls to virtual function.
    • Virtual function table thunks, used to manage base classes and polymorphism.
    • Template code bodies, which are emitted at first use unless explicitly instantiated.
    • The virtual function tables themselves.

    The C++ compiler does not provide mechanisms for direct control of where
    these entities are placed in memory. The pragmas necessary to control memory
    placement were not designed with C++ in mind.

    Libraries

    There are a number of distinct concerns in creating and using libraries:

    • The name of exported C++ functions can vary from one release to another.
    • Not all of the functions available in user mode are available in the kernel-mode libraries.
    • The Standard Template Library is designed to work with data objects from a single DLL.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in a recent project I've come really need the lib tre matching library. However
I would like to remove from Mac OS-X taskbar (Dock) the XCode's recent project
On a recent Java project, we needed a free Java based real-time data plotting
A recent project called for importing data into an Oracle database. The program that
In a recent project, I was able to use the following syntax to get
I would like to prettyprint a table-like data structure in Haskell (a list of
In a recent project of mine, i've got up to a good stage where
for a recent project I need to detect file system changes on a mapped
In a recent project, I have to maintain some PHP code. I set up
I'm just adopting Sass in a recent project and am trying to get the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.