Nah, the original post that got us onto the topic of clans stemmed from the discussion of memory leaks... it was pointed out that since fread_string automatically allocates a new chunk of memory for the strings that are read from the file, it sometimes wastes that chunk of memory when the string isn't directly assign to say, a char value in the user structure, but instead used to perform a lookup of some kind and then discarded... the example that was used to display this was in save.c, where the clan data (which is stored as a string in the pfile, with the value of the person's clan name) is read in, automatically allocated space, used to perform the clan_lookup to get the integer index of that clan in the clan_table, and then just discarded... since it's not assigned to a variable that can be freed when the lookup is finished w/ the value, and instead uses the returned value (which has been allocated space) directly to do nothing but perform a lookup, that's one common place where leaks occur in stock ROM... another is the race_lookup... we just got onto the topic of clans because that was the example that was presented, and so Valnir was just toying with different ways to reword that section of the pfile loading, so that he could apply the same format to the other areas where the same phenomenon occurs...
Richard Lindsey -----Original Message----- From: Christopher Bunting [mailto:[EMAIL PROTECTED] Sent: Thursday, April 07, 2005 11:39 AM To: Richard Lindsey Cc: [email protected] Subject: Re: Memory issues. Hello, Sorry.. Since I have been around Rom for a long time. My replies here to this thread were meant to be constructive.. But can I ask at what point everything jumped to clans? First, the mention was act_comm.c, then in do_function, then the block of clan code, and now to save.c.. So I'm guessing that with the switch over to clans that the issue arrises from saving clans in save.c? This is where there is trouble? Not trying to sound stupid, Just trying to understand and be constructive. Chris

