zpl-c / enet

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

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

Open sduensin opened 2 years ago

sduensin commented 2 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/ )