Make file memory check

  • cunning
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 year 2 weeks ago #8660 by cunning
Make file memory check was created by cunning
I don't know how I missed this but if you add -DMEMORY_DEBUG to libs, you get all the memory issues gcc can find. Its amazing how easy sprintf(buf, "test %s", buf1) as an example gets called out.

I fixed quite a few with sprint(buf + strlrn(buf1), "test "

But wow do you get tons of gcc warnings when you compile

Please Log in or Create an account to join the conversation.

More
1 year 2 weeks ago #8662 by thomas
Replied by thomas on topic Make file memory check
Indeed - it uses the zmalloc code. Here, a little excerpt from the comment at the top of zmalloc.h:

This code was not part of the original CircleMUD distribution. It has been
included in tbaMUD and is attributed to:
Version 1.1 Copyright 1996, 1998, 1999, 2000 Eric Murray This email address is being protected from spambots. You need JavaScript enabled to view it.

Note that the code in tbamud isn't an exact copy of Eric's code, but is derived from his example.
The following user(s) said Thank You: cunning

Please Log in or Create an account to join the conversation.

Time to create page: 0.078 seconds