Changeset 4934 in vbox
- Timestamp:
- Sep 20, 2007 2:31:27 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 24682
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvTAPOs2.cpp
r4643 r4934 27 27 #include <iprt/string.h> 28 28 #include <iprt/thread.h> 29 #include <iprt/alloca.h> 29 30 #include <iprt/asm.h> 30 31 #include <iprt/semaphore.h> … … 118 119 STAM_PROFILE_START(&pThis->StatTransmit, a); 119 120 121 /* 122 * If the pvBuf is a high address, we'll have to copy it onto a 123 * stack buffer of the tap driver will trap. 124 */ 125 if ((uintptr_t)pvBuf >= _1M*512) 126 { 127 void *pvBufCopy = alloca(cb); 128 memcpy(pvBufCopy, pvBuf, cb); 129 pvBuf = pvBufCopy; 130 } 131 120 132 #ifdef LOG_ENABLED 121 133 uint64_t u64Now = RTTimeProgramNanoTS(); … … 123 135 cb, u64Now, u64Now - pThis->u64LastReceiveTS, u64Now - pThis->u64LastTransferTS)); 124 136 pThis->u64LastTransferTS = u64Now; 125 #endif126 137 Log2(("%s Send: pvBuf=%p cb=%#zx\n" 127 138 "%.*Vhxd\n", 128 139 pThis->szName, pvBuf, cb, cb, pvBuf)); 140 #endif 129 141 130 142 ULONG Parm[2] = { ~0UL, ~0UL }; /* mysterious output */
Note:
See TracChangeset
for help on using the changeset viewer.