Skip to content

Proposal: SDL_MemoryMapFile #10940

Open
Open
@kieselsteini

Description

@kieselsteini

Hello there,

I've a small proposal for SDL3 here. There is the already well known SDL_LoadFile function which comes in very handy. But it would be also very handy, to have a similar function to effectively memory map a file. On most Unix systems this can be achieved with the mmap syscall and on Windows there is CreateFileMapping.

The signature of the function could look like:

const Uint8* SDL_MemoryMapFile(const char *filename, size_t *datasize)

Of course this will memory map the requested file as read only.

I can try to implement a first version of this feature, but I've no Windows box to test it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions