diff options
| author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2017-01-20 12:00:18 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2017-01-20 12:00:18 -0800 |
| commit | 9a475eeff90a181af0661b87b09af7337e39167a (patch) | |
| tree | 6a870242cb0f55117d8bf41a477115826ca7085c /node | |
| parent | 91a37ec639d031211237ff9f3748df78bcf6e91d (diff) | |
| download | infinitytier-9a475eeff90a181af0661b87b09af7337e39167a.tar.gz infinitytier-9a475eeff90a181af0661b87b09af7337e39167a.zip | |
Windows build fix, warning removal.
Diffstat (limited to 'node')
| -rw-r--r-- | node/Node.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/node/Node.hpp b/node/Node.hpp index 64c9fcb4..d7b039b8 100644 --- a/node/Node.hpp +++ b/node/Node.hpp @@ -65,6 +65,12 @@ public: Node(void *uptr,const struct ZT_Node_Callbacks *callbacks,uint64_t now); virtual ~Node(); + // Get rid of alignment warnings on 32-bit Windows and possibly improve performance +#ifdef __WINDOWS__ + void * operator new(size_t i) { return _mm_malloc(i,16); } + void operator delete(void* p) { _mm_free(p); } +#endif + // Public API Functions ---------------------------------------------------- ZT_ResultCode processWirePacket( |
