MEMORY.H(3)

πŸ“¦
version 1.5.2 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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