Search code examples
c++cstdmapwdk

Going down from C++ to C: alternative to std::map?


I am looking for minimalistic alternative for std::map<long, int>, which would go into Windows kernel driver, so it should be quite fast.. it is expected to hold a relatively small (~200 in working set) amount of keys and a large amount of inserts.

Looking for solution that can cut key search cost.


Solution

  • Already done for you.

    See the RtlXxxGenericTable and RtlXxxGenericTableAvl calls.

    • RtlInitializeElementGenericTable
    • RtlDeleteElementGenericTable
    • RtlEnumerateGenericTable
    • RtlEnumerateGenericTableWithoutSplaying
    • RtlGetElementGenericTable
    • RtlInsertElementGenericTable
    • RtlLookupElementGenericTable
    • RtlNumberGenericTableElements

    • RtlInitializeElementGenericTableAvl

    • RtlDeleteElementGenericTableAvl
    • RtlEnumerateGenericTableAvl
    • RtlGetElementGenericTableAvl
    • RtlInitializeGenericTable
    • RtlInsertElementGenericTableAvl
    • RtlLookupElementGenericTableAvl
    • RtlNumberGenericTableElementsAvl