mirror of
https://github.com/raysan5/raylib.git
synced 2026-05-12 12:50:31 +00:00
Page:
Static memory Requirements
Pages
CMake Build Options
Community Resources
Compile for OSX
Create Visual Studio 2019 Project
Create Visual Studio Project
Creating Discord Activities with raylib
Frequently Asked Questions
Home
Install and configure Touchscreen Drivers (RPi)
Quick Setup for Windows with Visual Studio 2022, GCC, or MinGW
Redirect raylib output to Framebuffer 1
Screen Recording
Static memory Requirements
Use multiple windows
Use raylib with Code Blocks
Use raylib with Eclipse
Use raylib with Sublime Text
Using BMFonts
Using SPI Displays with raylib
Using raylib in VSCode
Using raylib with Cpp
Visual Studio C# Setup
Working for Android (on Linux)
Working for Android (on macOS)
Working for Android
Working for Web (HTML5)
Working on Chrome OS
Working on FreeBSD
Working on GNU Linux
Working on Raspberry Pi
Working on Windows
Working on exaequOS
Working on macOS
Working with CMake
raylib GLFW dependency
raylib architecture
raylib coding conventions
raylib data structures
raylib default shader
raylib dependencies
raylib enumerated types
raylib generic uber shader and custom shaders
raylib input system
raylib integration with other libraries
raylib libc dependency
raylib platforms and graphics
raylib syntax analysis
raylib templates
No results
6
Static memory Requirements
Ray edited this page 2026-05-07 09:48:55 +02:00
Table of Contents
Memory requirements
raylib requires some static memory allocated to store internal global data.
This table shows the specific requirements per module. Note that it does not consider the support libraries memory requirements, included libraries can require additional globals.
| module | data type | x64 memory (bytes) | x86 memory (bytes) | notes |
|---|---|---|---|---|
rcore |
CoreData |
3112 | 3096 | cross-platform window, input, time, storage data; adds to PlatformData |
rlgl |
rlglData |
2736 | 2700 | OpenGL state, extensions and batching data |
rlsw |
sw_context_t |
1896 | 1784 | software rasterizer context data |
rshapes |
Texture2D, Rectangle |
36 | 36 | Texture and rec to map shapes, by default a white 3x3 pixel of the font atlas, to improve batching |
rtextures |
- | - | - | no static memory required |
rtext |
Font, int |
52 | 44 | Default font and text line spacing |
rtext |
char buffer[] |
18432 | 17920 | Static buffers required for immediate text management on multiple Text*() functions |
rmodels |
- | - | - | no static memory required |
raudio |
AudioData |
4096 | 3408 | Audio system, buffers and processors data; adds to miniaudio context data |
rcore includes different modules depending on target platform, every platform module defines a PlatformData structure to contain the static memory requirements for that platform, size varyes by module.
Platform modules requirements
TODO: Complete table with missing PlatformData sizes
| module | data type | x64 memory (bytes) | x86 memory (bytes) | notes |
|---|---|---|---|---|
rcore_desktop_glfw |
PlatformData |
16 | 8 | OS-dependant; adds to GLFW memory requirements |
rcore_desktop_sdl |
PlatformData |
... | ... | SDL required data; adds to SDL memory requirements |
rcore_desktop_rgfw |
PlatformData |
... | ... | adds to RGFW memory requirements |
rcore_desktop_win32 |
PlatformData |
... | ... | window and input data |
rcore_web |
PlatformData |
... | ... | canvas data (id, size) and GLFW window pointer, pixels buffer (software renderer) |
rcore_web_emscripten |
PlatformData |
80 | 74 | canvas id, glcontext pointer, pixels buffer (software renderer) |
rcore_drm |
PlatformData |
... | ... | ... |
rcore_android |
PlatformData |
... | ... | Android application and EGL display data |
rcore_memory |
PlatformData |
16 | 12 | Screen pixels buffer pointer and time frequency; adds to rlsw |
Frequently Asked Questions
Library Design
- Architecture
- Syntax analysis
- Data structures
- Enumerated types
- Static memory requirements
- External dependencies
- GLFW dependency
- libc dependency
- Platforms and graphics
- Input system
- Default shader
- Custom shaders
- Coding conventions
- Integration with other libs
Development Platforms
- Working on Windows
- Working on macOS
- Working on GNU Linux
- Working on Chrome OS
- Working on FreeBSD
- Working on Raspberry Pi
- Working for Android
- Working for Web (HTML5)
- Working on exaequOS Web Computer
- Creating Discord Activities
- Working anywhere with CMake
- CMake Build Options
IDE Configurations
- raylib templates: Get started easily
- How To: Quick C/C++ Setup in Visual Studio 2022, GCC or MinGW
- How To: C# Visual Studio Setup
- How To: VSCode
- How To: Eclipse
- How To: Sublime Text
- How To: Code::Blocks
Misc Help
www.raylib.com | itch.io | GitHub | Discord | YouTube