Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET CPUHog
Message
General information
Forum:
Visual FoxPro
Category:
VFPX/Sedna
Title:
Miscellaneous
Thread ID:
01027051
Message ID:
01398289
Views:
132
Hi Naomi,

Hmm I don't know... but if you need more memory for your application then check this article: http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx

...
Application Changes. No APIs are required to support application memory tuning. However, it would be ineffective to automatically provide every application with a 3-GB address space.

Executables that can use the 3-GB address space are required to have the bit IMAGE_FILE_LARGE_ADDRESS_AWARE set in their image header. If you are the developer of the executable, you can specify a linker flag (/LARGEADDRESSAWARE).

To set this bit, you must use Microsoft Visual Studio Version 6.0 or later and the Editbin.exe utility, which has the ability to modify the image header (/LARGEADDRESSAWARE) flag. For more information on setting this flag, see the Microsoft Visual Studio documentation.

Some manufacturers preconfigure their applications to use application memory tuning, making it unnecessary for you to make this change. For more information, see your application documentation and contact your application vendor to determine whether they support Large Address Awareness or whether you can enable it in their application.
...

MartinaJ

>Martina/everyone,
>
>Do you know how to limit processor's memory in .NET code?
>
>Thanks.
>
>>Hi David,
>>
>>
>>
>>#DEFINE THREAD_BASE_PRIORITY_LOWRT  15  && value that gets a thread to LowRealtime-1
>>#DEFINE THREAD_BASE_PRIORITY_MAX    2   && maximum thread base priority boost
>>#DEFINE THREAD_BASE_PRIORITY_MIN    -2  && minimum thread base priority boost
>>#DEFINE THREAD_BASE_PRIORITY_IDLE   -15 && value that gets a thread to idle
>>
>>
>>#DEFINE THREAD_PRIORITY_LOWEST          THREAD_BASE_PRIORITY_MIN
>>#DEFINE THREAD_PRIORITY_BELOW_NORMAL    (THREAD_PRIORITY_LOWEST+1)
>>#DEFINE THREAD_PRIORITY_NORMAL          0
>>#DEFINE THREAD_PRIORITY_HIGHEST         THREAD_BASE_PRIORITY_MAX
>>#DEFINE THREAD_PRIORITY_ABOVE_NORMAL    (THREAD_PRIORITY_HIGHEST-1)
>>
>>#DEFINE THREAD_PRIORITY_TIME_CRITICAL   THREAD_BASE_PRIORITY_LOWRT
>>#DEFINE THREAD_PRIORITY_IDLE            THREAD_BASE_PRIORITY_IDLE
>>
>>DECLARE INTEGER GetCurrentThread  IN kernel32.dll
>>DECLARE INTEGER GetThreadPriority IN kernel32.dll INTEGER
>>DECLARE INTEGER SetThreadPriority IN kernel32.dll INTEGER, INTEGER
>>
>>lihThread=GetCurrentThread()
>>lihThreadP=GetThreadPriority(lihThread)
>>=SetThreadPriority(lihThread,THREAD_PRIORITY_IDLE)
>>
>>*.... hard code
>>
>>=SetThreadPriority(lihThread,lihThreadP)
>>
>>* and equal functions for process
>>
>>
>>MartinJ
>>
>>>copy of something I posted in the Wiki topic http://fox.wikis.com/wc.dll?Wiki~VFPVersion10WishList this morning to spark further discussion here...
>>>
>>>
  • SET CPUHog ON | OFF | nPercentCPUUseAllowed ok so a better name is in order, but I think this one states the problem better...
    >>>
    >>>VFP needs to have a SET or sys() call that can be made to allow VFP to cooperate with other running tasks on a machine. There are two classic examples of where VFP's performance-at-all-costs mentality makes VFP fall flat. Long running SQL-SELECT executions and while waiting for long running synchronous SQLExec() results. When these operations happen on a fat-client VFP app or from inside a COM object used on a web server little other work can be accomplished on the box. TaskMan shows the VFP program as non-responding, which has probably caused more than a few needless End Task kills of the app. VFP needs a mode to give up CPU cycles and respond to Windows messages while these long running commands are executing. Losing a couple of percent execution speed on a SQL statement is an acceptable tradeoff if it means that a whole website will not go non-responsive or that a user can switch over to Word and be more productive while a VFP task is cranking away in the background. Currently we
    >>>have a work around for this fault by using a second machine which takes report query requests from a queue and processes them in an offline manner.
    "Navision is evil that needs to be erazed... to the ground"

    Jabber: gorila@dione.zcu.cz
    Jabber? Jabbim
  • Previous
    Reply
    Map
    View

    Click here to load this message in the networking platform