> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblEventsSetStorageAllotment

> XblEventsSetStorageAllotment

# XblEventsSetStorageAllotment

Set the maximum amount of disk space that Xsapi can use to store the events pending retry and upload before it starts deleting the oldest files.

## Syntax

```cpp theme={null}
HRESULT XblEventsSetStorageAllotment(  
         uint64_t storageAllotmentInBytes  
)  
```

### Parameters

*storageAllotmentInBytes*   \
Type: uint64\_t

Maximum storage space (in bytes) that will be used to store pending events.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

When the maximum storage space is exceeded, the oldest file will be silently deleted. Note that this is a global setting and will apply to all XBOX Live contexts. The default value is approximately 20MB.

## Requirements

**Header:** events\_c.h

**Library:** Microsoft.Xbox.Services.14x.GDK.C.lib

## See also

[events\_c](/reference/live/xsapi-c/events_c/events_c_members)


## Related topics

- [IDStorageQueueX1::EnqueueSetEvent](/reference/system/dstorage/interfaces/IDStorageQueueX1/methods/idstoragequeuex_enqueuesetevent.md)
- [XblLocalStorageSetHandlers](/reference/live/xsapi-c/platform_c/functions/xbllocalstoragesethandlers.md)
- [DirectStorage Overview](/build/console-features/storage/directstorage/directstorage-overview.md)
- [IDStorageQueueX1](/reference/system/dstorage/interfaces/IDStorageQueueX1/idstoragequeuex1.md)
- [PFPlatformLocalStorageSetHandlers](/services/playfab/api-references/c/pfplatform/functions/pfplatformlocalstoragesethandlers.md)
