operator new()

in src/framework/shared/inc/private/common/fxmemorybuffer.hpp [54:84]


    operator new(
        __in size_t Size,
        __in PFX_DRIVER_GLOBALS FxDriverGlobals,
        __in_opt PWDF_OBJECT_ATTRIBUTES Attributes,
        __in USHORT ExtraSize,
        __in ULONG Tag,
        __in POOL_TYPE PoolType
        )
    {
        //
        // PoolType must be non paged pool but it can be NonPagedPool
        // or NonPagedPoolNx or their variants
        //
        ASSERT(!FxIsPagedPoolType(PoolType));

        //
        // Specialize operator new so that we can use the caller's tag when
        // making the object allocation vs using the default driver-wide tag.
        //

        //
        // Used by WdfMemoryCreate. Keep POOL_TYPE for compat
        //
        return FxObjectHandleAlloc(FxDriverGlobals,
                                   PoolType,
                                   Size,
                                   Tag,
                                   Attributes,
                                   ExtraSize,
                                   FxObjectTypeExternal);
    }