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.