Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Memory allocation anomaly.

Author: Robert Hyatt

Date: 18:40:38 03/17/05

Go up one level in this thread


On March 17, 2005 at 21:16:36, Dann Corbit wrote:

>On March 17, 2005 at 17:07:15, Robert Hyatt wrote:
>
>>On March 17, 2005 at 14:47:24, Matthew Hull wrote:
>>
>>>I have two vanilla builds of GNUChess 5.07.  One is in CYGWIN, the other in
>>>Linux.  Both are on x86 architecture.  But each allocates hash memory in
>>>different volumes.
>>>
>>>Example command:
>>>
>>>./gnuchess -s 10000000
>>>
>>>On Cygwin, this allocates 393216K of hash memory.
>>>
>>>On Linux, it allocates 327680K
>>>
>>>What is the reason for this?
>>
>>Several possibilities.  But first, have you started both programs without the -s
>>option to see how big they are, then restarted both with the -s to see the
>>difference?
>
>Some other likely differences:
>
>1.  structure packing (since the hash table seems to be an 'entries' count if
>the struct is aligned differently it will not be at all surprising if the same
>count of structs has different sizes on two machines.
>
>2.  memory page sizes are different (small differences will be explained this
>way)

On the PC the pagesize is 4K period.  Unless you use the huge page-size which
most operating systems do not use (4mb for intel, I think AMD opteron supports a
2M page size as well).

I can't imagine anyone with a hash entry size that is not a multiple of 4/8,
which would eliminate the packing issue on the X86 box...




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.