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

# 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.142.C.lib or Microsoft.Xbox.Services.143.C.lib

## See also

[events\_c](https://docs.xbox.com/reference/live/xsapi-c/events_c/events_c_members.md)


## Related topics

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