News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

POLINK

Started by Grincheux, January 07, 2016, 04:05:30 AM

Previous topic - Next topic

Grincheux

What means the option "/WS:AGRESSIVE"?

ragdog

I think its same like ms linker

Quote


/WS:AGGRESSIVE

Use the /WS:AGGRESSIVE option to add the WS_AGGRESSIVE attribute to your application's image. The Windows NT 4.0 (and later) loader will recognize this attribute and aggressively trim the working set of the process when it is not active. Using this option is similar to adding the following call throughout your application.

SetProcessWorkingSetSize(GetCurrentProcess(), 0xffffffff, 0xffffffff);

/WS:AGGRESSIVE can be used for applications that must have a low impact on the system's memory pool.

If the speed of your application is important, do not use /WS:AGGRESSIVE without testing the resulting performance implications. Ideal candidates are processes that tend to operate in the background, such as services and screen savers.

Grincheux

Quoteloader will recognize this attribute and aggressively trim

Yes but it this sentence that I do not understand. I already read this without understand.
I am French and my english is poor.

Vortex

Reading Pelles manual :

Quote/WS Specifies aggressive trimming of the 'working set' (appears to be obsolete).

Syntax:
/WS:AGGRESSIVE

Description:
The /WS:AGGRESSIVE option tells the operating-system to aggressively trim the linked executables "working set" when run. This option should only be used on programs that mainly works in the background, and has varying amount of work to do. One example of this is a screensaver. The IMAGE_FILE_AGGRESIVE_WS_TRIM flag will be set in the file header of the linked executable. See Microsoft Windows documentation for more information about this flag (the flag appears to be obsolete).

Grincheux

I don't understand any more but I can forget it.

jj2007

Quote from: ragdog on January 07, 2016, 04:10:18 AM... aggressively trim the working set of the process when it is not active.

By default, Windows is generous with applications, and assigns more megabytes than really needed. The /WS option was meant to prevent this behaviour, especially for small executables that are launched in great numbers e.g. on servers. Imagine you get a thousand requests in parallel on a server, it launches a thousand little proggies in parallel that just open a database, collect a few bytes and send it to the client. If each of these proggies gets 10 MBytes by default, the server will break down.

I have made some tests with a graphics-intensive application, see "Simple Graphics". Attached three executables:
- xx_default  with default settings for the application, which include an invoke EmptyWorkingSet
- xx_noEWS  same but no such invoke
- xx_WsAgg  same but /WS:aggressive as linker option

The screenshot below shows that the linker option has absolutely no effect.

Grincheux

Very Clear

It's a kind of /CP:1 at the msdos time
But /CP:1 was good and had effect on memory but here 12Kb!