Changeset 102334 in vbox for trunk/src/libs/xpcom18a4/ipc
- Timestamp:
- Nov 27, 2023 4:08:53 PM (14 months ago)
- Location:
- trunk/src/libs/xpcom18a4/ipc/ipcd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/transmngr/common/tmTransaction.cpp
r31259 r102334 38 38 #include <stdlib.h> 39 39 #include "tmTransaction.h" 40 #ifdef VBOX_USE_IPRT_IN_XPCOM 41 # include <iprt/mem.h> 42 #endif 40 41 #include <iprt/mem.h> 43 42 44 43 /////////////////////////////////////////////////////////////////////////////// … … 47 46 tmTransaction::~tmTransaction() { 48 47 if (mHeader) 49 #ifdef VBOX_USE_IPRT_IN_XPCOM50 48 RTMemFree(mHeader); 51 #else52 free(mHeader);53 #endif54 49 } 55 50 … … 68 63 // indicates the message is the entire raw message 69 64 if (aQueueID == TM_INVALID_ID) { 70 #ifdef VBOX_USE_IPRT_IN_XPCOM71 65 header = (tmHeader*) RTMemAlloc(aLength); 72 #else73 header = (tmHeader*) malloc(aLength);74 #endif75 66 if (header) { 76 67 mRawMessageLength = aLength; … … 81 72 } 82 73 else { // need to create the tmHeader and concat the message 83 #ifdef VBOX_USE_IPRT_IN_XPCOM84 74 header = (tmHeader*) RTMemAlloc (sizeof(tmHeader) + aLength); 85 #else86 header = (tmHeader*) malloc (sizeof(tmHeader) + aLength);87 #endif88 75 if (header) { 89 76 mRawMessageLength = sizeof(tmHeader) + aLength; -
trunk/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcMessage.cpp
r101996 r102334 205 205 if (MsgLen() > IPC_MSG_GUESSED_SIZE) { 206 206 // realloc message buffer to the correct size 207 #ifdef VBOX_USE_IPRT_IN_XPCOM208 207 mMsgHdr = (ipcMessageHeader *) RTMemRealloc(mMsgHdr, MsgLen()); 209 #else210 mMsgHdr = (ipcMessageHeader *) realloc(mMsgHdr, MsgLen());211 #endif212 208 } 213 209 } … … 219 215 // allocate a partial buffer 220 216 PRUint32 msgLen = IPC_MSG_GUESSED_SIZE; 221 #ifdef VBOX_USE_IPRT_IN_XPCOM222 217 mMsgHdr = (ipcMessageHeader *) RTMemAlloc(msgLen); 223 #else224 mMsgHdr = (ipcMessageHeader *) malloc(msgLen);225 #endif226 218 if (!mMsgHdr) 227 219 return PR_FAILURE; … … 234 226 else { 235 227 PRUint32 msgLen = *(PRUint32 *) buf; 236 #ifdef VBOX_USE_IPRT_IN_XPCOM237 228 mMsgHdr = (ipcMessageHeader *) RTMemAlloc(msgLen); 238 #else239 mMsgHdr = (ipcMessageHeader *) malloc(msgLen);240 #endif241 229 if (!mMsgHdr) 242 230 return PR_FAILURE; -
trunk/src/libs/xpcom18a4/ipc/ipcd/util/src/ipcMessageWriter.cpp
r31259 r102334 40 40 #include "prmem.h" 41 41 #include <string.h> 42 #ifdef VBOX_USE_IPRT_IN_XPCOM 43 # include <iprt/mem.h> 44 #endif 42 43 #include <iprt/mem.h> 45 44 46 45 //***************************************************************************** … … 51 50 { 52 51 if (mBuf) 53 #ifdef VBOX_USE_IPRT_IN_XPCOM54 52 RTMemFree(mBuf); 55 #else56 free(mBuf);57 #endif58 53 } 59 54 … … 116 111 117 112 PRInt32 curPos = mBufPtr - mBuf; 118 #ifdef VBOX_USE_IPRT_IN_XPCOM119 113 mBuf = (PRUint8*)RTMemRealloc(mBuf, mCapacity); 120 #else121 mBuf = (PRUint8*)realloc(mBuf, mCapacity);122 #endif123 114 if (!mBuf) { 124 115 mError = PR_TRUE;
Note:
See TracChangeset
for help on using the changeset viewer.