# NativeParallelHashMap(int, AllocatorHandle)

> Initializes and returns an instance of NativeParallelHashMap.

## Definition

* **Type:** Constructor
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public NativeParallelHashMap(int capacity, AllocatorManager.AllocatorHandle allocator)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of key-value pairs that should fit in the initial allocation.**** (\[AllocatorHandle]\(/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle)): The allocator to use.
