Changeset 27023 in vbox for trunk/src/VBox/Additions/common/VBoxGuestLib
- Timestamp:
- Mar 4, 2010 1:32:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp
r26999 r27023 237 237 * @returns IPRT status code 238 238 * @param pu32Size Memory balloon size in MBs (out) 239 */ 240 VBGLR3DECL(int) VbglR3MemBalloonRefresh(uint32_t *pu32Size) 241 { 242 return vbglR3DoIOCtl(VBOXGUEST_IOCTL_CHECK_BALLOON, pu32Size, sizeof(*pu32Size)); 243 } 244 245 246 /** 247 * 239 * @param pfHandleInR3 Allocating of memory in R3 required (out) 240 */ 241 VBGLR3DECL(int) VbglR3MemBalloonRefresh(uint32_t *pcChunks, bool *pfHandleInR3) 242 { 243 VBoxGuestCheckBalloonInfo Info; 244 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_CHECK_BALLOON, &Info, sizeof(Info)); 245 *pcChunks = Info.cBalloonChunks; 246 *pfHandleInR3 = Info.fHandleInR3; 247 return rc; 248 } 249 250 251 /** 252 * Change the memory by granting/reclaiming memory to/from R0. 253 * 254 * @returns IPRT status code 255 * @param pv Memory chunk (1MB) 256 * @param fInflate true = inflate balloon (grant memory) 257 * false = deflate balloon (reclaim memory) 248 258 */ 249 259 VBGLR3DECL(int) VbglR3MemBalloonChange(void *pv, bool fInflate) 250 260 { 251 261 VBoxGuestChangeBalloonInfo Info; 252 Info.u64ChunkAddr = (uint64_t) pv;262 Info.u64ChunkAddr = (uint64_t)((uintptr_t)pv); 253 263 Info.fInflate = fInflate; 254 264 return vbglR3DoIOCtl(VBOXGUEST_IOCTL_CHANGE_BALLOON, &Info, sizeof(Info));
Note:
See TracChangeset
for help on using the changeset viewer.