Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Google, Yandex

Members: 0
Guests: 14
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
621
KellieBusb
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Wouldhave in hash_stats
Forum Rules | Mark all | Recent Posts

Wouldhave in hash_stats
< Newer Topic :: Older Topic > This is the correct way

Pages:<< prev 1 next >>
Post is unread #1 Jul 26, 2005, 11:32 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,874
JoinedJul 26, 2005

In normal smaug in char *hash_stats( void ) found in hashstr.c had this
wouldhave += (ptr->links * (ptr->length + 1));


In smaugFUSS it has this
wouldhave += ( sizeof( struct hashstr_data ) + ( ptr->links * ( ptr->length + 1 ) ) );


The one in FUSS is closer to being correct but it should have it like this
wouldhave += ((ptr->links * sizeof(struct hashstr_data)) + (ptr->links * (ptr->length + 1)));


The reason it should have it set up like that is because if not being done like this
it would have to use a new string also and there for each link would be its own string and the size of each string should be taken into affect.
       
Pages:<< prev 1 next >>