Memory may not be released efficiently when the 'Load only when needed' option is selected in the TCP/IP control panel. This is a normal condition for the Mac OS, especially if non-TCP applications are opened after a TCP/IP application is opened.
When opening TCP/IP applications, if TCP is not loaded Open Transport loads the TCP/IP stack into the memory reserved by Mac OS for applications (application heap) after the TCP/IP application. After the last TCP/IP application is quit, the TCP/IP stack unloads from memory. However, if other non-TCP/IP applications have been loaded before quitting the TCP/IP application, memory can become fragmented.
For instance, if you load TCP/IP application A and another non-TCP/IP application B, memory may be arranged as follows (from top of memory to bottom):
Free Memory
APP B
TCP/IP STACK
APP A
When you quit Application A memory may look like this:
Free Memory Block 2
APP B
Free Memory Block 1
At this point, the memory is fragmented because the free memory block is split into two parts by application B. If you choose About this Computer from the Apple menu and look at the memory usage information, the Largest Unused Block would be smaller than it was before opening applications A and B. The Largest Unused Block is the largest block of contiguous memory, and with application A in the middle of two free memory blocks, blocks 1 and 2 cannot be joined together to form a larger contiguous block.
The workaround is to deselect the 'Load Only As Needed' option in the TCP/IP control panel (but leave TCP/IP active). This forces Mac OS to load TCP/IP into memory before applications use any of the application heap, thereby preventing memory fragmentation. The drawback is that memory is always be allocated to the TCP/IP stack, defeating the benefits of the 'Load Only As Needed' option.
The TCP/IP stack unloads from memory about two minutes after there is no TCP/IP activity. With some PPP connections, the stack does not unload. PPP users should always have TCP/IP loaded.