# GetAllocator()

> Retrieve a global scratchpad allocator.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public static ref ScratchpadAllocator GetAllocator()
```

### Returns

| Type                                                                                         | Description                              |
| -------------------------------------------------------------------------------------------- | ---------------------------------------- |
| [ScratchpadAllocator](/engine/7000.0/script-reference/unity/entities/scratchpadallocator.md) | Returns the global scratchpad allocator. |
