# ExtractStackTraceNoAlloc(byte*, int, string)

> Populate an unmanaged buffer with the current managed call stack as a sequence of UTF-8 bytes, without allocating GC memory. Returns the number of bytes written into the buffer.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static int ExtractStackTraceNoAlloc(byte* buffer, int bufferMax, string projectFolder)
```

### Parameters

**** (\[byte\*]\(https\://learn.microsoft.com/dotnet/api/system.byte)): Target buffer to receive the callstack text**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Max number of bytes to write**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Project folder path, to clean up path names

### Returns

| Type                                                       | Description |
| ---------------------------------------------------------- | ----------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) |             |
