CreateAllocator property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtEp> this_ptr, Pointer<OrtMemoryInfo> memory_info, Pointer<Pointer<OrtAllocator>> allocator)>> CreateAllocator
getter/setter pair

\brief Create an OrtAllocator for the given OrtMemoryInfo for an OrtSession.

The OrtMemoryInfo instance will match one of the values set in the OrtEpDevice using EpDevice_AddAllocatorInfo. Any allocator specific options should be read from the session options.

If nullptr OrtEpFactory::CreateAllocator will be used.

\paramin this_ptr The OrtEpFactory instance. \paramin memory_info The OrtMemoryInfo to create the allocator for. May be nullptr. \paramout allocator The created OrtAllocator instance. Set to nullptr if the default CPU allocator is used.

\snippet{doc} snippets.dox OrtStatus Return Value

\since Version 1.23.

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtEp> this_ptr,
      ffi.Pointer<OrtMemoryInfo> memory_info,
      ffi.Pointer<ffi.Pointer<OrtAllocator>> allocator,
    )
  >
>
CreateAllocator;