---
name: "io_uring_register_file_alloc_range"
section: "3"
platform: "linux"
package: "liburing"
version: "2.15-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/io_uring_register_file_alloc_range"
---

# io\_uring\_register\_file\_alloc\_range(3)

set range for fixed file allocations

## NAME

io\_uring\_register\_file\_alloc\_range - set range for fixed file allocations

## SYNOPSIS

```
#include <liburing.h>
```

**int io\_uring\_register\_file\_alloc\_range(struct io\_uring \****ring***,**                                        **unsigned** *off***,**                                        **unsigned** *len***);**

## DESCRIPTION

The [**io\_uring\_register\_file\_alloc\_range**(3)](/io_uring_register_file_alloc_range/3.md) function sets the allowable range for fixed file index allocations within the kernel. When requests that can instantiate a new fixed file are used with **IORING\_FILE\_INDEX\_ALLOC ,** the application is asking the kernel to allocate a new fixed file descriptor rather than pass in a specific value for one. By default, the kernel will pick any available fixed file descriptor within the range available. Calling this function with *off* set to the starting offset and *len* set to the number of descriptors, the application can limit the allocated descriptors to that particular range. This effectively allows the application to set aside a range just for dynamic allocations, with the remainder being used for specific values.

The application must have registered a fixed file table upfront, e.g. through [**io\_uring\_register\_files**(3)](/io_uring_register_files/3.md) or [**io\_uring\_register\_files\_sparse**(3)](/io_uring_register_files_sparse/3.md)**.**

Available since 6.0.

## RETURN VALUE

On success [**io\_uring\_register\_file\_alloc\_range**(3)](/io_uring_register_file_alloc_range/3.md) returns 0. On failure it returns **-errno**.

## SEE ALSO

[**io\_uring\_register\_files**(3)](/io_uring_register_files/3.md) [**io\_uring\_prep\_accept\_direct**(3)](/io_uring_prep_accept_direct/3.md) [**io\_uring\_prep\_openat\_direct**(3)](/io_uring_prep_openat_direct/3.md) [**io\_uring\_prep\_socket\_direct**(3)](/io_uring_prep_socket_direct/3.md)
