VirtualBox

Changeset 100307 in vbox for trunk/include


Ignore:
Timestamp:
Jun 28, 2023 10:17:34 AM (18 months ago)
Author:
vboxsync
Message:

Runtime,Additions,HostDrivers: Provide API to query the host page size and associated parameters for architectures where the used page size can vary (like on linux.arm64 depending on the kernel config), bugref:10476

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/mangling.h

    r100171 r100307  
    24342434# define RTSymlinkRead                                  RT_MANGLER(RTSymlinkRead)
    24352435# define RTSymlinkReadA                                 RT_MANGLER(RTSymlinkReadA)
     2436# define RTSystemGetPageSize                            RT_MANGLER(RTSystemGetPageSize)
     2437# define RTSystemGetPageOffsetMask                      RT_MANGLER(RTSystemGetPageOffsetMask)
     2438# define RTSystemGetPageShift                           RT_MANGLER(RTSystemGetPageShift)
     2439# define RTSystemPageAlignSize                          RT_MANGLER(RTSystemPageAlignSize)
    24362440# define RTSystemQueryFirmwareType                      RT_MANGLER(RTSystemQueryFirmwareType)
    24372441# define RTSystemQueryFirmwareBoolean                   RT_MANGLER(RTSystemQueryFirmwareBoolean)
  • trunk/include/iprt/system.h

    r98103 r100307  
    163163 */
    164164RTDECL(int) RTSystemQueryUnavailableRam(uint64_t *pcb);
     165
     166/**
     167 * Returns the page size in bytes of the system.
     168 *
     169 * @returns Page size in bytes.
     170 */
     171RTDECL(uint32_t) RTSystemGetPageSize(void);
     172
     173/**
     174 * Returns the page shift in bits of the system.
     175 *
     176 * @returns Page shift in bits.
     177 */
     178RTDECL(uint32_t) RTSystemGetPageShift(void);
     179
     180/**
     181 * Returns the page offset mask of the system.
     182 *
     183 * @returns Page offset maske.
     184 */
     185RTDECL(uintptr_t) RTSystemGetPageOffsetMask(void);
     186
     187/**
     188 * Aligns the given size to the systems page size.
     189 *
     190 * @returns Byte size aligned to the systems page size.
     191 * @param   cb                  The size in bytes to align.
     192 */
     193RTDECL(size_t) RTSystemPageAlignSize(size_t cb);
    165194
    166195
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette