RobLoach / RobLoach/raylib-libretro
Switch core variables to dynamic allocation
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 38
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
The core variables arrays in raylib-libretro.h:314 use fixed-size buffers (LIBRETRO_MAX_CORE_VARIABLES = 512, each string 512 chars). This wastes static memory and could silently overflow with cores that register many options dynamically.
Switch to MemAlloc'd strings with a growable array to remove the hard cap and reduce the static footprint of the LibretroData struct.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read raylib-libretro.h around line 314 and trace how the core variable arrays are registered, resized, used, and released. Replace the fixed buffers with dynamically allocated strings and a growable array so the LIBRETRO_MAX_CORE_VARIABLES cap and static footprint are removed without leaks or invalid accesses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100