diff --git a/lib/cpp/src/protocol/TBinaryProtocol.cpp b/lib/cpp/src/protocol/TBinaryProtocol.cpp
index 929499b..b3e9fbc 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.cpp
+++ b/lib/cpp/src/protocol/TBinaryProtocol.cpp
@@ -406,7 +406,7 @@
 
   // Use the heap here to prevent stack overflow for v. large strings
   if (size > string_buf_size_ || string_buf_ == NULL) {
-    string_buf_ = (uint8_t*)realloc(string_buf_, (uint32_t)size);
+    string_buf_ = (uint8_t*)std::realloc(string_buf_, (uint32_t)size);
     if (string_buf_ == NULL) {
       string_buf_size_ = 0;
       throw TProtocolException(TProtocolException::UNKNOWN, "Out of memory in TBinaryProtocol::readString");
diff --git a/lib/cpp/src/protocol/TBinaryProtocol.h b/lib/cpp/src/protocol/TBinaryProtocol.h
index 9203865..dc47b3a 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.h
+++ b/lib/cpp/src/protocol/TBinaryProtocol.h
@@ -50,7 +50,7 @@
 
   ~TBinaryProtocol() {
     if (string_buf_ != NULL) {
-      free(string_buf_);
+      std::free(string_buf_);
       string_buf_size_ = 0;
     }
   }
diff --git a/lib/cpp/src/server/TNonblockingServer.cpp b/lib/cpp/src/server/TNonblockingServer.cpp
index de32db5..3263887 100644
--- a/lib/cpp/src/server/TNonblockingServer.cpp
+++ b/lib/cpp/src/server/TNonblockingServer.cpp
@@ -108,7 +108,7 @@
       while (readWant_ > readBufferSize_) {
         readBufferSize_ *= 2;
       }
-      readBuffer_ = (uint8_t*)realloc(readBuffer_, readBufferSize_);
+      readBuffer_ = (uint8_t*)std::realloc(readBuffer_, readBufferSize_);
       if (readBuffer_ == NULL) {
         GlobalOutput("TConnection::workSocket() realloc");
         close();
diff --git a/lib/cpp/src/server/TNonblockingServer.h b/lib/cpp/src/server/TNonblockingServer.h
index e043b54..89c69a0 100644
--- a/lib/cpp/src/server/TNonblockingServer.h
+++ b/lib/cpp/src/server/TNonblockingServer.h
@@ -12,6 +12,7 @@
 #include <transport/TTransportUtils.h>
 #include <concurrency/ThreadManager.h>
 #include <stack>
+#include <cstdlib>
 #include <event.h>
 
 namespace facebook { namespace thrift { namespace server {
@@ -288,7 +289,7 @@
 
   // Constructor
   TConnection(int socket, short eventFlags, TNonblockingServer *s) {
-    readBuffer_ = (uint8_t*)malloc(1024);
+    readBuffer_ = (uint8_t*)std::malloc(1024);
     if (readBuffer_ == NULL) {
       throw new facebook::thrift::TException("Out of memory.");
     }
diff --git a/lib/cpp/src/transport/TFileTransport.cpp b/lib/cpp/src/transport/TFileTransport.cpp
index ac739ec..a4b275f 100644
--- a/lib/cpp/src/transport/TFileTransport.cpp
+++ b/lib/cpp/src/transport/TFileTransport.cpp
@@ -23,6 +23,7 @@
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
+#include <cstdlib>
 #include <iostream>
 #include <sys/stat.h>
 
@@ -209,7 +210,7 @@
   }
 
   eventInfo* toEnqueue = new eventInfo();
-  toEnqueue->eventBuff_ = (uint8_t *)malloc((sizeof(uint8_t) * eventLen) + 4);
+  toEnqueue->eventBuff_ = (uint8_t *)std::malloc((sizeof(uint8_t) * eventLen) + 4);
   // first 4 bytes is the event length
   memcpy(toEnqueue->eventBuff_, (void*)(&eventLen), 4);
   // actual event contents
diff --git a/lib/cpp/src/transport/THttpClient.cpp b/lib/cpp/src/transport/THttpClient.cpp
index c213ef0..901a4e0 100644
--- a/lib/cpp/src/transport/THttpClient.cpp
+++ b/lib/cpp/src/transport/THttpClient.cpp
@@ -4,6 +4,8 @@
 // See accompanying file LICENSE or visit the Thrift site at:
 // http://developers.facebook.com/thrift/
 
+#include <cstdlib>
+
 #include "THttpClient.h"
 #include "TSocket.h"
 
@@ -54,7 +56,7 @@
 }
 
 void THttpClient::init() {
-  httpBuf_ = (char*)malloc(httpBufSize_+1);
+  httpBuf_ = (char*)std::malloc(httpBufSize_+1);
   if (httpBuf_ == NULL) {
     throw TTransportException("Out of memory.");
   }
@@ -63,7 +65,7 @@
 
 THttpClient::~THttpClient() {
   if (httpBuf_ != NULL) {
-    free(httpBuf_);
+    std::free(httpBuf_);
   }
 }
 
@@ -202,7 +204,7 @@
   uint32_t avail = httpBufSize_ - httpBufLen_;
   if (avail <= (httpBufSize_ / 4)) {
     httpBufSize_ *= 2;
-    httpBuf_ = (char*)realloc(httpBuf_, httpBufSize_+1);
+    httpBuf_ = (char*)std::realloc(httpBuf_, httpBufSize_+1);
     if (httpBuf_ == NULL) {
       throw TTransportException("Out of memory.");
     }
diff --git a/lib/cpp/src/transport/TTransportUtils.cpp b/lib/cpp/src/transport/TTransportUtils.cpp
index e1f37b8..cb7ab61 100644
--- a/lib/cpp/src/transport/TTransportUtils.cpp
+++ b/lib/cpp/src/transport/TTransportUtils.cpp
@@ -310,7 +310,7 @@
       bufferSize_ *= 2;
       avail = bufferSize_ - wPos_;
     }
-    buffer_ = (uint8_t*)realloc(buffer_, bufferSize_);
+    buffer_ = (uint8_t*)std::realloc(buffer_, bufferSize_);
     if (buffer_ == NULL) {
       throw TTransportException("Out of memory.");
     }
@@ -354,7 +354,7 @@
     // Double the size of the underlying buffer if it is full
     if (rLen_ == rBufSize_) {
       rBufSize_ *=2;
-      rBuf_ = (uint8_t *)realloc(rBuf_, sizeof(uint8_t) * rBufSize_);
+      rBuf_ = (uint8_t *)std::realloc(rBuf_, sizeof(uint8_t) * rBufSize_);
     }
 
     // try to fill up the buffer
@@ -387,7 +387,7 @@
     while ((len + wLen_) >= newBufSize) {
       newBufSize *= 2;
     }
-    wBuf_ = (uint8_t *)realloc(wBuf_, sizeof(uint8_t) * newBufSize);
+    wBuf_ = (uint8_t *)std::realloc(wBuf_, sizeof(uint8_t) * newBufSize);
     wBufSize_ = newBufSize;
   }
 
diff --git a/lib/cpp/src/transport/TTransportUtils.h b/lib/cpp/src/transport/TTransportUtils.h
index 83abf8e..59d8fb8 100644
--- a/lib/cpp/src/transport/TTransportUtils.h
+++ b/lib/cpp/src/transport/TTransportUtils.h
@@ -7,6 +7,7 @@
 #ifndef _THRIFT_TRANSPORT_TTRANSPORTUTILS_H_
 #define _THRIFT_TRANSPORT_TTRANSPORTUTILS_H_ 1
 
+#include <cstdlib>
 #include <string>
 #include <algorithm>
 #include <transport/TTransport.h>
@@ -301,7 +302,7 @@
   void initCommon(uint8_t* buf, uint32_t size, bool owner, uint32_t wPos) {
     if (buf == NULL && size != 0) {
       assert(owner);
-      buf = (uint8_t*)malloc(size);
+      buf = (uint8_t*)std::malloc(size);
       if (buf == NULL) {
         throw TTransportException("Out of memory");
       }
@@ -394,7 +395,7 @@
 
   ~TMemoryBuffer() {
     if (owner_) {
-      free(buffer_);
+      std::free(buffer_);
       buffer_ = NULL;
     }
   }
@@ -537,8 +538,8 @@
     pipeOnRead_ = true;
     pipeOnWrite_ = false;
 
-    rBuf_ = (uint8_t*) malloc(sizeof(uint8_t) * rBufSize_);
-    wBuf_ = (uint8_t*) malloc(sizeof(uint8_t) * wBufSize_);
+    rBuf_ = (uint8_t*) std::malloc(sizeof(uint8_t) * rBufSize_);
+    wBuf_ = (uint8_t*) std::malloc(sizeof(uint8_t) * wBufSize_);
   }
 
   TPipedTransport(boost::shared_ptr<TTransport> srcTrans,
@@ -549,13 +550,13 @@
     rBufSize_(512), rPos_(0), rLen_(0),
     wBufSize_(sz), wLen_(0) {
 
-    rBuf_ = (uint8_t*) malloc(sizeof(uint8_t) * rBufSize_);
-    wBuf_ = (uint8_t*) malloc(sizeof(uint8_t) * wBufSize_);
+    rBuf_ = (uint8_t*) std::malloc(sizeof(uint8_t) * rBufSize_);
+    wBuf_ = (uint8_t*) std::malloc(sizeof(uint8_t) * wBufSize_);
   }
 
   ~TPipedTransport() {
-    free(rBuf_);
-    free(wBuf_);
+    std::free(rBuf_);
+    std::free(wBuf_);
   }
 
   bool isOpen() {
@@ -567,7 +568,7 @@
       // Double the size of the underlying buffer if it is full
       if (rLen_ == rBufSize_) {
         rBufSize_ *=2;
-        rBuf_ = (uint8_t *)realloc(rBuf_, sizeof(uint8_t) * rBufSize_);
+        rBuf_ = (uint8_t *)std::realloc(rBuf_, sizeof(uint8_t) * rBufSize_);
       }
 
       // try to fill up the buffer
