Home  /  Resources & support  /  FAQs  /  Stata 6: Windows memory allocation
Note: This FAQ is for users of Stata 6. It is not relevant for more recent versions.

Stata 6: Windows memory allocation

Title   Stata 6: Windows memory allocation
Author Chinh Nguyen, StataCorp

Why can’t I access all available free memory from Windows 3.1?

This is almost always due to device drivers being loaded in the wrong order or a misbehaving device driver. See Stata is crashing—Do you have bad or conflicting device drivers?

Another possible cause is programs that do not completely free up their memory when they exit. This is because Stata requires that its memory be one large contiguous block. Programs that do not completely free their memory on exit leave the available memory fragmented, which prevents Stata from getting all the memory it is requesting.

An early version of WordPerfect has been known to do this. Restart Windows and make sure that Stata is the first application you start.

How do I set the amount of memory allocated to Stata under Windows 3.1 and 98/95/NT?

Under Windows 3.1, click the Stata application icon, select File → Properties and change the /k option in the Command Line edit field.

There are two ways to change the program properties under Windows 98/95/NT.

The first method is to first create a shortcut for the Wstata icon on the desktop, and then change the property of this Stata icon. The process is as follows:

  1. Locate the My Computer icon on the desktop, double-click it.
  2. Double-click Ms-dos(C:) icon.
  3. Double-click Windows icon.
  4. Double-click Start Menu icon.
  5. Double-click Programs icon.
  6. Double-click Stata icon.
  7. You should now be in the directory c:\windows\Start Menu\Programs\Stata, and there should be an Intercooled Stata icon, a Pseudo-Intercooled Stata icon, or a Small Stata icon in this directory, depending on the flavor of Stata you have installed. For the sake of convenience, let's call this icon the wstata.exe icon.
  8. Right-click and drag the wstata.exe icon to the desktop area.
  9. You should now see the options move here, copy here, create shortcut here, etc. Click create shortcut here.
  10. Now you should have a wstata.exe icon on the desktop.
  11. Right-click this wstata.exe icon on the desktop and select Properties.
  12. Choose the shortcut tab. There should be a target line reading c:\stata\wstata.exe.
  13. Now add /k#### to the end of the target line, where #### is the desired amount of memory. You will get this amount of memory assigned to Stata's data the next time you double-click this wstata.exe icon on the desktop. For example, if we want to change to 5MB, or 5000k, the target line should read: c:\stata\wstata.exe /k5000.

The other way is to modify the Stata shortcut in the taskbar (everything you see in the taskbar is actually a shortcut):

  1. Select Start → Settings → Taskbar from the Start task button.
  2. Select the Start Menu Programs tab.
  3. Click the Advanced button.
  4. Find the Stata icon under the Start Menu → Programs → Stata heirarchy and select it.
  5. Select Properties from the File menu.
  6. Click the Shortcut tab and modify the /k option in the Target edit field.