RobLoach / RobLoach/raylib-libretro

Switch core variables to dynamic allocation

Open
#346 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.