Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: available memory

Author: Scott Gasch

Date: 11:03:07 10/05/01

Go up one level in this thread


On October 05, 2001 at 12:44:46, Roy Eassa wrote:

>On October 05, 2001 at 07:13:11, James Swafford wrote:
>
>>On October 04, 2001 at 23:23:22, Dave Gomboc wrote:
>>
>>>On October 04, 2001 at 13:51:17, James Swafford wrote:
>>>
>>>>On October 04, 2001 at 13:15:51, Kurt Utzinger wrote:
>>>>
>>>>>On October 04, 2001 at 08:47:44, JW de Kort wrote:
>>>>>
>>>>>>Hi friends,
>>>>>>
>>>>>>just a simple question. I want my hashtable to be as big as possible but in
>>>>>>order to decide the size i need to know how much physical memory is still
>>>>>>available. The problem is however that i do not know which instruction i should
>>>>>>use to get the size of the available memory. Iám using Visual C++ 4.2. Can
>>>>>>anybody help me?
>>>>>>
>>>>>>thanks!
>>>>>>
>>>>>>Jan Willem
>>>>>
>>>>>Hi Jan
>>>>>The available physical memory can be checked with the windows program
>>>>>"C:\WINDOWS\SYSMON.EXE". There are of course also other tools for the same
>>>>>purpose.
>>>>>Regards
>>>>>Kurt
>>>>
>>>>I think he's asking for a C or C++ instruction that he can use
>>>>in code...
>>>>
>>>>(Sorry, I don't know how to do that, or if you can do that.)
>>>>
>>>>--
>>>>James
>>>
>>>I don't know how to do it myself, but I'm sure it's in the API somewhere.  After
>>>all, sysmon is doing it. :-)
>>>
>>>Dave
>>
>>Does the fact that sysmon is doing it necessarily mean it's in
>>the API?  (I read in Scott's post how to do it...)
>>
>>That may sound like a retarded question, but I'm serious...
>>
>
>It's NOT a dumb question.
>
>Microsoft has many, many "hidden" calls into Windows.  This is a major complaint
>of competitors -- Microsoft shares these hidden calls with its own Office
>engineers, but not with those of competitors, thereby allowing MS-Office to
>perform better.

There are no "secrets to better performance".  Almost everything you can do with
private APIs you can do with public ones.  It's mostly untrue that windows
developers are sharing their tricky backdoors with office.

Although I am sure most third parties think there are special secret tricks
hidden all over windows and MS keeps these cool, easy, fast ways to do things
secret for their own devious plans of world domination.  I mean, why would MS
want to make a fast, easy, cool way to do something public -- MS has no interest
in improving the quality of their APIs or making outside developers happy.
Right.

>Anyway, the function to check available memory could very well be one such
>hidden call, and in that sense it's not officially in the API.

Didn't I just post a public way of doing this?  Do you think there's a "better"
way hidden somewhere?  I'm curious, can you tell us your theory of what the
government has hidden at area 51 too?

FYI, I wrote some test code a while ago tried to break the so-called "Native
API".  So I am pretty familiar with the entire thing.  I found a few things that
you could not do from win32 but most were like "who cares."  The ONLY thing I
ever found that was somewhat useful to do that there was no equivalent win32
call for was determining the type of a handle (i.e. you pass me a random handle
and I say "ah, yes, this is a file handle... or a semaphore handle, etc...)
Though I can make the case that any code that somehow "forgot" what its handle
was for is lame anyway.

Scott



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.