MEMORY.H(3)
π include/Zycore/API/Memory.h(3) β Library Functions Manual π
okay bestie, gather round, because we're reading the memory header from Zycore and honestly? it's giving "small file, big power." π§ β¨ this is the include/Zycore/API/Memory.h page, filed under Library Functions Manual, and it's about pages, granularity, and protecting your memory like it's your peace. π«Ά
πΈ NAME πΈ
include/Zycore/API/Memory.h
like... that's the whole name. it's a header file, she's humble, she contains multitudes. π
β¨ SYNOPSIS β¨
first things first, the includes you're gonna need, no cap:
#include <Zycore/Defines.h>
#include <Zycore/Status.h>
#include <Zycore/Types.h>
π Typedefs
typedef enum ZyanMemoryPageProtection_ ZyanMemoryPageProtection
π Enumerations
enum ZyanMemoryPageProtection_
π Functions
ZYCORE_EXPORT ZyanU32 ZyanMemoryGetSystemPageSize (void)ZYCORE_EXPORT ZyanU32 ZyanMemoryGetSystemAllocationGranularity (void)ZYCORE_EXPORT ZyanStatus ZyanMemoryVirtualProtect (void *address, ZyanUSize size, ZyanMemoryPageProtection protection)ZYCORE_EXPORT ZyanStatus ZyanMemoryVirtualFree (void *address, ZyanUSize size)
π Typedef Documentation π
π¦ typedef enum ZyanMemoryPageProtection_ ZyanMemoryPageProtection
defines the ZyanMemoryPageProtection enum. that's it, that's the whole job, and she does it flawlessly. π
π Enumeration Type Documentation π
π¦ enum ZyanMemoryPageProtection_
defines the ZyanMemoryPageProtection enum. yes, same energy as the typedef above, because they're literally the same thing in two outfits. π
π₯ Function Documentation π₯
π ZYCORE_EXPORT ZyanU32 ZyanMemoryGetSystemAllocationGranularity (void )
returns the system allocation granularity. we love a getter that just gets. β¨
bestie, the system allocation granularity specifies the minimum amount of bytes which can be allocated at a specific address by a single call of ZyanMemoryVirtualAlloc. so like, that's the smallest chunk the system will hand you in one go β no splitting, no negotiating. π
this value is typically 64KiB on Windows systems, and it's equal to the page size on most POSIX platforms. two vibes, one value. π
Returns
- the system allocation granularity.
π ZYCORE_EXPORT ZyanU32 ZyanMemoryGetSystemPageSize (void )
returns the system page size. short king of a function, extremely useful. π
Returns
- the system page size.
π ZYCORE_EXPORT ZyanStatus ZyanMemoryVirtualFree (void * address, ZyanUSize size)
releases one or more memory pages starting at the given address. bye bestie, go be free, we won't hold you. π¦
Parameters
- address β the start address aligned to a page boundary.
- size β the size.
Returns
- a zyan status code.
π ZYCORE_EXPORT ZyanStatus ZyanMemoryVirtualProtect (void * address, ZyanUSize size, ZyanMemoryPageProtection protection)
changes the memory protection value of one or more pages. glow-up but for permissions. π β¨
Parameters
- address β the start address aligned to a page boundary.
- size β the size.
- protection β the new page protection value.
Returns
- a zyan status code.
heads up bestie: both address values up there need to be aligned to a page boundary. the manpage says it, so I'm saying it, and the system will notice if you don't. π
π Author π
generated automatically by Doxygen for Zycore from the source code. yes, a robot wrote it, and yes, it ate. π€β¨
and that's the whole page, fr fr. this was include/Zy...PI/Memory.h(3) from Zycore, Version 1.5.2.0 β love that for us. π mwah, go forth and allocate responsibly. ππ«Ά
π¦ where this page comes from
- ubuntu resolute: libzycore-doc 1.5.2-1build1 Β· MIT
- ubuntu stonking: libzycore-doc 1.5.2-1build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms