zpl-c / enet

⚡️ ENet reliable UDP networking library
https://blog.zpl.pw
MIT License
703 stars 60 forks source link

Member names 'malloc' and 'free' conflict with memory utilities. #36

Open sduensin opened 3 years ago

sduensin commented 3 years ago

When trying to use enet with various memory leak tools, they break enet when redefining 'malloc' and 'free'. Replacing the definitions in ENetCallBacks with 'emalloc' and 'efree' (and related locations in the code) fixes it.

(Specifically, MemWatch: http://www.linkdata.se/sourcecode/memwatch/ )