Alternate Variations & ERR_MEM
Quick answer
pedalternatevariations.meta defines substitute models so that large masks and hoods do not clip through hair. It has its own capacity, and overflowing it produces ERR_MEM_MULTI_ALLOC_FREE. On patched FiveM builds that capacity is 512.
Difficulty: Intermediate · Affects: both · VERSION DEPENDENT — vanilla capacity differs from patched FiveM
INFO
Search: ERR_MEM_MULTI_ALLOC_FREE, pedalternatevariations, hair clipping, mask, hood, alternate variation.
Last verified 31 August 2026 · docs.gta.clothing.
Important numbers
| Runtime | Capacity | Tag |
|---|---|---|
| GTA V before b2189 | 128 | APPROXIMATE |
| GTA V b2189 and later | 160 | APPROXIMATE |
| FiveM with the limit fix | 512 | CONFIRMED — merged, with a bounds guard |
How it works
When a player equips a large mask or hood, the game swaps the hair model for a cut-down alternative. Each of those substitutions is an entry. A single mask that has to account for every hairstyle on the server generates a lot of them.
That is why the crash appears on servers with many add-on hairstyles: 81 vanilla hairstyles plus 79 custom ones can fill a 160-entry working set on their own, before any mask is added.
What happens if you exceed it
ERR_MEM_MULTI_ALLOC_FREEThis is a RAGE allocator error, and clothing is only one of its possible causes. Treat it as alternate variations only if your server runs a lot of add-on hair or masks. Otherwise it may be entirely unrelated.
Solution
- Update the client build. The 512-entry capacity is the real fix. Confirm players are on a FiveM version that includes it.
- Generate fewer entries. Durty Cloth Tool has an option to disable extra alternate-variation features, which produces a smaller set. Hair cutting under masks becomes less accurate.
- Reduce add-on hairstyle count if you are far past the capacity.
WARNING
Do not permanently delete pedalternatevariations.meta
Deleting the file and its fxmanifest.lua reference stops the crash, and also stops hair from being cut or removed under masks and hoods. Hair will clip through. Use it as a temporary diagnostic, not a fix.
Not the same as hats
Hair clipping through hats is a different system: head-prop hair expressions live in mp_creaturemetadata_<pack>.ymt and cost a YMT slot. Hair clipping through masks and hoods is this page. If heels or hat-hair stopped working, the creature metadata file is the one to look at — see Understanding YMT.
