Ryan Houdek 1bab28dad4 FEXCore: Adds a lock-free atomic bitset that supports contiguous range allocations
This thing is a bit intense, so some requirements from the start:
- It needs to be lock-free and thread-safe
- It needs to support contiguous range allocations
- It needs to support allocations larger than a single atomic word

These requirements kind of fly in the face of most bitset allocators
where they will support some parts of these requirements, or just throw
a mutex in front of the whole thing.

Some implementation details:
- If allocating only 1-bit, trivial and always succeeds if there is space
- If allocating <= 64-bit, then always succeeds if there is at least
  those many contiguous bits within a single atomic word
  - Allocation can fail if there are cross-word contiguous bits of the
    size available
  - Introduces some sparsity
- If allocating > 64-bits then it falls down the longer scan path.
  - Searches for contiguous bits of free space between multiple atomic
    words.
  - If found, will attempt to allocate tracking which bits were allocated
  - If allocation fails, unwind bits already acquired and continue
    scanning

Some downsides to this implementation:
- Allocations can fail if sparsity builds up
- Heavily contended allocations can be worse than a lock
  - If larger than atomic word allocations are in flight.
- Unwinding larger than word allocations and continuing scanning adds
  overhead, a lock would have won at that point.
- A small bit of false sharing where an atomic word is read without
  acquire semantics for scanning can technically overlook some
  allocations that no longer exist.
- Slower than a linear allocator, but that's not unexpected.

Most of these downsides are okay for our use case, which is code buffer
allocations with the ability to do partial invalidation. If the atomic
bitset fails to fit an allocation, we can throw away the code buffer
like we currently do.

The bitmap allocator that uses this lock-free atomic bitset is still
in-flight but this is one complex container that can land independently.
2026-08-10 14:12:09 -07:00
2026-08-04 16:55:43 -07:00
2026-07-21 09:32:23 -04:00
2025-07-17 08:09:25 +02:00
2026-05-22 14:03:14 -07:00
2026-05-22 14:03:14 -07:00
2022-09-02 10:43:07 -07:00
2026-05-22 14:03:14 -07:00
2020-03-06 09:08:13 +02:00

中文

FEX: Emulate x86 Programs on ARM64

FEX allows you to run x86 applications on ARM64 Linux devices, similar to qemu-user and box64. It offers broad compatibility with both 32-bit and 64-bit binaries, and it can be used alongside Wine/Proton to play Windows games.

It supports forwarding API calls to host system libraries like OpenGL or Vulkan to reduce emulation overhead. An experimental code cache helps minimize in-game stuttering as much as possible. Furthermore, a per-app configuration system allows tweaking performance per game, e.g. by skipping costly memory model emulation. We also provide a user-friendly FEXConfig GUI to explore and change these settings.

Prerequisites

FEX requires ARMv8.0+ hardware. It has been tested with the following Linux distributions, though others are likely to work as well:

  • Arch Linux
  • Fedora Linux
  • openSUSE
  • Ubuntu 22.04/24.04/24.10/25.04

An x86-64 RootFS is required and can be downloaded using our FEXRootFSFetcher tool for many distributions. For other distributions you will need to generate your own RootFS (our wiki page might help).

Quick Start

For Ubuntu 22.04, 24.04, 24.10 and 25.04

Execute the following command in the terminal to install FEX through a PPA.

curl --silent https://raw.githubusercontent.com/FEX-Emu/FEX/main/Scripts/InstallFEX.py | python3

This command will walk you through installing FEX through a PPA, and downloading a RootFS for use with FEX.

For other Distributions

Follow the guide on the official FEX-Emu Wiki here.

Navigating the Source

See the Source Outline for more information.

S
Description
GitHub pull mirror of FEX-Emu/FEX. GitHub repository ID: 245352386. Gitea import mode: github-full.
https://github.com/FEX-Emu/FEX Readme MIT
57 MiB
0 Stars 1 Watchers 0 Forks
2026-10-05 11:20:10 +02:00
Languages
C++ 55.9%
Assembly 37.9%
C 3.8%
Python 1.2%
CMake 0.9%
Other 0.2%