PHYSFS_Allocator(3)
β¨ PHYSFS_Allocator(3) β¨
okay bestie, welcome to the Library Functions Manual page for PHYSFS_Allocator β yes that's the whole title, and yes it's about PhysicsFS allocation function pointers. sit down, hydrate, let's go π«Ά
πΈ NAME πΈ
PHYSFS_Allocator β PhysicsFS allocation function pointers.
π SYNOPSIS π
#include <physfs.h>
π Data Fields
int(* Init )(void)
void(* Deinit )(void)
void *(* Malloc )(PHYSFS_uint64)
void *(* Realloc )(void *, PHYSFS_uint64)
void(* Free )(void *)
π¦ Detailed Description π¦
PhysicsFS allocation function pointers.
so like. (This is for limited, hardcore use. If you don't immediately see a need for it, you can probably ignore this forever.) literally if you read that and went "huh?" β that's your sign, babe, walk away, it's not for you, and that's fine π
You create one of these structures for use with PHYSFS_setAllocator. Allocators are assumed to be reentrant by the caller; please mutex accordingly. no cap, that mutex is on you, not on PhysicsFS. π
Allocations are always discussed in 64-bits, for future expansion... we're on the cusp of a 64-bit transition, and we'll probably be allocating 6 gigabytes like it's nothing sooner or later, and I don't want to change this again at that point. (iconic foresight tbh π) If you're on a 32-bit platform and have to downcast, it's okay to return NULL if the allocation is greater than 4 gigabytes, since you'd have to do so anyhow.
π See also
PHYSFS_setAllocator
π Field Documentation π
β void(* PHYSFS_Allocator::Deinit) (void)
Deinitialize your allocator. Can be NULL.
β void(* PHYSFS_Allocator::Free) (void *)
Free memory from Malloc or Realloc.
β int(* PHYSFS_Allocator::Init) (void)
Initialize. Can be NULL. Zero on failure. (so like, 0 means it flopped, bestie, don't get it twisted π)
β void *(* PHYSFS_Allocator::Malloc) (PHYSFS_uint64)
Allocate like malloc().
β void *(* PHYSFS_Allocator::Realloc) (void *, PHYSFS_uint64)
Reallocate like realloc().
π Author π
Generated automatically by Doxygen for physfs from the source code. (not a human author, just a robot doing its little thing π€β¨)
and that's the whole page, babe π mwah π β this was physfs, Version 3.2.0, and the page is PHYSFS_Allocator(3). slay, go forth and allocate responsibly π¦π
π¦ where this page comes from
- arch rolling: physfs 3.2.0-5 Β· Zlib
- fedora 44: physfs-devel 3.2.0-3.fc44 Β· Zlib
- fedora 44: physfs-devel 3.2.0-3.fc44 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms