General discussion

Locked

SORT.EXE and Windows NT

By vembar_gopal ·
A 'out of memory' exception is received when sorting large files. I need to sort a 700MB+ file and when I tried to use the following command, I receive an 'out of memory'exception.
sort < input_file > output_file

The server that I am running this sort on contains enough memory (4GB). What are the limitations of the 'Sort' program under Windows NT ? I am able to execute the sort with the same size file successfully under Windows 2000.

Thanks

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

SORT.EXE and Windows NT

by azrookie In reply to SORT.EXE and Windows NT

From Microsoft:

The sort command has no limit on file size.

***

The following might apply to your case, as you direct the results to an output file.

Your computer running Windows NT may become unresponsive and may display an error message indicating that the computer is running low on virtual memory.

In addition, Performance Monitor shows a rise in paged pool memory usage that never declines.

This behavior may occur if a program makes a call to the Win32 application programming interface (API) function CreateFile(), and passes a drive letter that is mapped to a remote file system using the Windows NT redirector (this results in an error value of ERROR_INVALID_NAME). The Windows NT redirector did not release memory allocated to attempt this operation.


RESOLUTION

Windows NT Server or Workstation 4.0
To resolve this problem, obtain the latest service pack for Windows NT 4.0 or the individual software update. (Resolved by SP6)

***


After you install Windows NT Server 4.0, Enterprise Edition, the operating system may not use all available memory if you have more than 256 megabytes (MB) of RAM installed.


CAUSE
During the installation process, the "/maxmem=256" switch is added to the Boot.ini file. This switch is added to prevent problems that may occur when the Windows NT base code is installed on computers with more than 256 MB of RAM. The Windows NT base code is installed first during a normal Enterprise Edition installation.When you reboot the computer after the installation is complete, the operating system is limited to using the first 256 MB of available memory unless you remove the "/maxmem=256" switch from the Boot.ini file.

Collapse -

SORT.EXE and Windows NT

by vembar_gopal In reply to SORT.EXE and Windows NT

We have the latest and greatest service pack from Microsoft and no it does not have the memory limitation that is given in the cause of the problem (/maxmem=256). When the sort is executing the Memory utilization of the 'sort.exe' increases until the point that it can no longer allocate any more memory (1.7GB+ counting).

Collapse -

SORT.EXE and Windows NT

by achp In reply to SORT.EXE and Windows NT

First of all, the Sort program is a Win32 process, and no process can consume any more than 2GB of memory (and even a bit less).

What is written below is just a guess; I can't know that exactly.

The difference in behaviour among the WinNT's Sort and the Win2k's Sort may be caused by their using of different sort algorithms.

Try to take Win2k's SORT.EXE and launch it on WinNT to do your job. That could work, perhaps.

Collapse -

SORT.EXE and Windows NT

by vembar_gopal In reply to SORT.EXE and Windows NT

Thanks for your input. That was my first reaction as well to see if the Win2K sort.exe would work. Unfortunately, it tries to hook into the methods embedded into KERNEL32.DLL etc.. of Win2K.

Back to Windows Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums