Memory Leak (David Estes-Smargiassi) Mac OS

broken image


(Redirected from Mac OS memory management)

Occasionally, memory leaks do crop up on the macOS operating system. The most current example is in macOS Catalina 10.15.6, where a problem with the App Sandbox made creating a virtual desktop. I believe this is known as a 'memory leak' where an application acquires but doesn't release memory. This seems to occur most with browsers, and can slow the entire machine. I have two Macs - one MacBook Pro for work, one Desktop for personal use - that are at least 2.4 GH Intel Core 2 Duos with 2 or 4 GB of memory. I don't think this is a memory leak, the amount of memory used doesn't increase when there are more calls to testiter(1os.system) to check my guesss.

'About This Computer' Mac OS 9.1 window showing the memory consumption of each open application and the system software itself.

Historically, the classic Mac OS used a form of memory management that has fallen out of favor in modern systems. Criticism of this approach was one of the key areas addressed by the change to Mac OS X.

The original problem for the engineers of the Macintosh was how to make optimum use of the 128 KB of RAM with which the machine was equipped, on Motorola 68000-based computer hardware that did not support virtual memory.[1] Since at that time the machine could only run one application program at a time, and there was no fixedsecondary storage, the engineers implemented a simple scheme which worked well with those particular constraints. That design choice did not scale well with the development of the machine, creating various difficulties for both programmers and users.

Fragmentation[edit]

The primary concern of the original engineers appears to have been fragmentation – that is, the repeated allocation and deallocation of memory through pointers leading to many small isolated areas of memory which cannot be used because they are too small, even though the total free memory may be sufficient to satisfy a particular request for memory. To solve this, Apple engineers used the concept of a relocatable handle, a reference to memory which allowed the actual data referred to be moved without invalidating the handle. Apple's scheme was simple – a handle was simply a pointer into a (non-relocatable) table of further pointers, which in turn pointed to the data.[2] If a memory request required compaction of memory, this was done and the table, called the master pointer block, was updated. The machine itself implemented two areas in memory available for this scheme – the system heap (used for the OS), and the application heap.[3] As long as only one application at a time was run, the system worked well. Since the entire application heap was dissolved when the application quit, fragmentation was minimized.

The memory management system had weaknesses; the system heap was not protected from errant applications, as would have been possible if the system architecture had supported memory protection, and this was frequently the cause of system problems and crashes.[4] In addition, the handle-based approach also opened up a source of programming errors, where pointers to data within such relocatable blocks could not be guaranteed to remain valid across calls that might cause memory to move. This was a real problem for almost every system API that existed. Because of the transparency of system-owned data structures at the time, the APIs could do little to solve this. Thus the onus was on the programmer not to create such pointers, or at least manage them very carefully by dereferencing all handles after every such API call. Since many programmers were not generally familiar with this approach, early Mac programs suffered frequently from faults arising from this.[5]

Palm OS and 16-bit Windows use a similar scheme for memory management, but the Palm and Windows versions make programmer error more difficult. For instance, in Mac OS, to convert a handle to a pointer, a program just de-references the handle directly, but if the handle is not locked, the pointer can become invalid quickly. Calls to lock and unlock handles are not balanced; ten calls to HLock are undone by a single call to HUnlock.[6] In Palm OS and Windows, handles are an opaque type and must be de-referenced with MemHandleLock on Palm OS or Global/LocalLock on Windows. When a Palm or Windows application is finished with a handle, it calls MemHandleUnlock or Global/LocalUnlock. Palm OS and Windows keep a lock count for blocks; after three calls to MemHandleLock, a block will only become unlocked after three calls to MemHandleUnlock.

Memory Leak (David Estes-Smargiassi) Mac OS

Addressing the problem of nested locks and unlocks can be straightforward (although tedious) by employing various methods, but these intrude upon the readability of the associated code block and require awareness and discipline on the part of the coder.

Memory leaks and stale references[edit]

Awareness and discipline are also necessary to avoid memory 'leaks' (failure to deallocate within the scope of the allocation) and to avoid references to stale handles after release (which usually resulted in a hard crash—annoying on a single-tasking system, potentially disastrous if other programs are running).

Switcher[edit]

The situation worsened with the advent of Switcher, which was a way for a Mac with 512KB or more of memory to run multiple applications at once.[7] This was a necessary step forward for users, who found the one-app-at-a-time approach very limiting. Because Apple was now committed to its memory management model, as well as compatibility with existing applications, it was forced to adopt a scheme where each application was allocated its own heap from the available RAM.[8]The amount of actual RAM allocated to each heap was set by a value coded into the metadata of each application, set by the programmer. Sometimes this value wasn't enough for particular kinds of work, so the value setting had to be exposed to the user to allow them to tweak the heap size to suit their own requirements. While popular among 'power users', this exposure of a technical implementation detail was against the grain of the Mac user philosophy. Apart from exposing users to esoteric technicalities, it was inefficient, since an application would be made to grab all of its allotted RAM, even if it left most of it subsequently unused. Another application might be memory starved, but would be unable to utilize the free memory 'owned' by another application.[3]

While an application could not beneficially utilize a sister application's heap, it could certainly destroy it, typically by inadvertently writing to a nonsense address. An application accidentally treating a fragment of text or image, or an unassigned location as a pointer could easily overwrite the code or data of other applications or even the OS, leaving 'lurkers' even after the program was exited. Such problems could be extremely difficult to analyze and correct.

Switcher evolved into MultiFinder in System 4.2, which became the Process Manager in System 7, and by then the scheme was long entrenched. Apple made some attempts to work around the obvious limitations – temporary memory was one, where an application could 'borrow' free RAM that lay outside of its heap for short periods, but this was unpopular with programmers so it largely failed to solve the problems. Apple's System 7 Tune-up addon added a 'minimum' memory size and a 'preferred' size—if the preferred amount of memory was not available, the program could launch in the minimum space, possibly with reduced functionality. This was incorporated into the standard OS starting with System 7.1, but still did not address the root problem.[9]

Virtual memory schemes, which made more memory available by paging unused portions of memory to disk, were made available by third-party utilities like Connectix Virtual, and then by Apple in System 7. This increased Macintosh memory capacity at a performance cost, but did not add protected memory or prevent the memory manager's heap compaction that would invalidate some pointers.

32-bit clean[edit]

Originally the Macintosh had 128 kB of RAM, with a limit of 512 kB. This was increased to 4 MB upon the introduction of the Macintosh Plus. These Macintosh computers used the 68000 CPU, a 32-bit processor, but only had 24 physical address lines. The 24 lines allowed the processor to address up to 16 MB of memory (224 bytes), which was seen as a sufficient amount at the time. The RAM limit in the Macintosh design was 4 MB of RAM and 4 MB of ROM, because of the structure of the memory map.[10] This was fixed by changing the memory map with the Macintosh II and the Macintosh Portable, allowing up to 8 MB of RAM.

Because memory was a scarce resource, the authors of the Mac OS decided to take advantage of the unused byte in each address. The original Memory Manager (up until the advent of System 7) placed flags in the high 8 bits of each 32-bit pointer and handle. Each address contained flags such as 'locked', 'purgeable', or 'resource', which were stored in the master pointer table. When used as an actual address, these flags were masked off and ignored by the CPU.[4]

While a good use of very limited RAM space, this design caused problems when Apple introduced the Macintosh II, which used the 32-bit Motorola 68020 CPU. The 68020 had 32 physical address lines which could address up to 4 GB (232 bytes) of memory. The flags that the Memory Manager stored in the high byte of each pointer and handle were significant now, and could lead to addressing errors.

In theory, the architects of the Macintosh system software were free to change the 'flags in the high byte' scheme to avoid this problem, and they did. For example, on the Macintosh IIci and later machines, HLock() and other APIs were rewritten to implement handle locking in a way other than flagging the high bits of handles. But many Macintosh application programmers and a great deal of the Macintosh system software code itself accessed the flags directly rather than using the APIs, such as HLock(), which had been provided to manipulate them. By doing this they rendered their applications incompatible with true 32-bit addressing, and this became known as not being '32-bit clean'.

In order to stop continual system crashes caused by this issue, System 6 and earlier running on a 68020 or a 68030 would force the machine into 24-bit mode, and would only recognize and address the first 8 megabytes of RAM, an obvious flaw in machines whose hardware was wired to accept up to 128 MB RAM – and whose product literature advertised this capability. With System 7, the Mac system software was finally made 32-bit clean, but there were still the problem of dirty ROMs. The problem was that the decision to use 24-bit or 32-bit addressing has to be made very early in the boot process, when the ROM routines initialized the Memory Manager to set up a basic Mac environment where NuBus ROMs and disk drivers are loaded and executed. Older ROMs did not have any 32-bit Memory Manager support and so was not possible to boot into 32-bit mode. Surprisingly, the first solution to this flaw was published by software utility company Connectix, whose 1991 product MODE32 reinitialized the Memory Manager and repeated early parts of the Mac boot process, allowing the system to boot into 32-bit mode and enabling the use of all the RAM in the machine. Apple licensed the software from Connectix later in 1991 and distributed it for free. The Macintosh IIci and later Motorola based Macintosh computers had 32-bit clean ROMs.

It was quite a while before applications were updated to remove all 24-bit dependencies, and System 7 provided a way to switch back to 24-bit mode if application incompatibilities were found.[3] By the time of migration to the PowerPC and System 7.1.2, 32-bit cleanliness was mandatory for creating native applications and even later Motorola 68040 based Macs could not support 24-bit mode.[6][11]

Object orientation[edit]

The rise of object-oriented languages for programming the Mac – first Object Pascal, then later C++ – also caused problems for the memory model adopted. At first, it would seem natural that objects would be implemented via handles, to gain the advantage of being relocatable. These languages, as they were originally designed, used pointers for objects, which would lead to fragmentation issues. A solution, implemented by the THINK (later Symantec) compilers, was to use Handles internally for objects, but use a pointer syntax to access them. This seemed a good idea at first, but soon deep problems emerged, since programmers could not tell whether they were dealing with a relocatable or fixed block, and so had no way to know whether to take on the task of locking objects or not. Needless to say this led to huge numbers of bugs and problems with these early object implementations. Later compilers did not attempt to do this, but used real pointers, often implementing their own memory allocation schemes to work around the Mac OS memory model.

While the Mac OS memory model, with all its inherent problems, remained this way right through to Mac OS 9, due to severe application compatibility constraints, the increasing availability of cheap RAM meant that by and large most users could upgrade their way out of a corner. The memory was not used efficiently, but it was abundant enough that the issue never became critical. This is ironic given that the purpose of the original design was to maximise the use of very limited amounts of memory. Mac OS X finally did away with the whole scheme, implementing a modern sparse virtual memory scheme. A subset of the older memory model APIs still exists for compatibility as part of Carbon, but maps to the modern memory manager (a thread-safe malloc implementation) underneath.[6] Apple recommends that Mac OS X code use malloc and free 'almost exclusively'.[12]

References[edit]

  1. ^Hertzfeld, Andy (September 1983), The Original Macintosh: We're Not Hackers!, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  2. ^Hertzfeld, Andy (January 1982), The Original Macintosh: Hungarian, archived from the original on June 19, 2010, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  3. ^ abcmemorymanagement.org (December 15, 2000), Memory management in Mac OS, archived from the original on May 16, 2010, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  4. ^ abHertzfeld, Andy, The Original Macintosh: Mea Culpa, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  5. ^Apple Computer (October 1, 1985), Technical Note OV09: Debugging With PurgeMem and CompactMem, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  6. ^ abcLegacy Memory Manager Reference, Apple Inc., June 27, 2007, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  7. ^Hertzfeld, Andy (October 1984), The Original Macintosh: Switcher, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  8. ^Mindfire Solutions (March 6, 2002), Memory Management in Mac OS(PDF), p. 2, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  9. ^'System 7.1 upgrade guide'(PDF). Archived from the original(PDF) on March 4, 2016. Retrieved May 26, 2015.
  10. ^'memory maps'. Osdata.com. March 28, 2001. Retrieved May 11, 2010.CS1 maint: discouraged parameter (link)
  11. ^Apple Computer (January 1, 1991), Technical Note ME13: Memory Manager Compatibility, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  12. ^Memory Allocation Recommendations on OS X, Apple Inc, July 12, 2005, retrieved September 22, 2009CS1 maint: discouraged parameter (link)

External links[edit]

  • Macintosh: ROM Size for Various Models, Apple Inc, August 23, 2000, retrieved September 22, 2009CS1 maint: discouraged parameter (link)
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Classic_Mac_OS_memory_management&oldid=1008965847'

James Larus
spim@larusstone.org

Microsoft Research
Formerly: Professor, Computer Sciences Department, University of Wisconsin-Madison

spim has moved to SourceForge.org. New versions of spim are at that site. This site only contains old versions of the simulator.

Why move? SourceForge offers a number of services, such as a source code repository and collaborative tools, that make it easier to share code with other developers. Now that spim has an open source license, the time has come to move off a 20-year old web site and join the 21st century.

Table of Contents

What's New?

QtSpim is a new user interface for spim built on the Qt UI framework. Qt is cross-platform, so the same user iterface and same code will run on Windows, Linux, and Mac OS X (yeah!). Moreover, the interface is clean and up-to-date (unlike the archaic X windows interface).

Spim has moved to SourceForge! The source code for all version of spim are in an SVN repository and compiled version are available for download. There is also a bug tracker and discussion forum.

spim is a self-contained simulator that runs MIPS32 programs. It reads and executes assembly language programs written for this processor. spim also provides a simple debugger and minimal set of operating system services. spim does not execute binary (compiled) programs.

spim implements almost the entire MIPS32 assembler-extended instruction set. (It omits most floating point comparisons and rounding modes and the memory system page tables.) The MIPS architecture has several variants that differ in various ways (e.g., the MIPS64 architecture supports 64-bit integers and addresses), which means that spim will not run programs compiled for all MIPS processors. MIPS compilers also generate a number of assembler directives that spim cannot process. These directives usually can be safely ignored.

Earlier versions of spim (before 7.0) implemented the MIPS-I instruction set used on the MIPS R2000/R3000 computers. This architecture is obsolete (though, never surpassed for its simplicity and elegance). spim now supports the more modern MIPS32 architecture, which is the MIPS-I instruction set augmented with a large number of occasionally useful instructions. MIPS code from earlier versions of SPIM should run without changes, except code that handles exceptions and interrupts. This part of the architecture changed over time (and was poorly implemented in earlier versions of spim). This type of code will need to be updated. Examples of new exception handling are in the files: exceptions.s and Tests/tt.io.s.

spim comes with complete source code and documentation. It also include a torture test to verify a port to a new machine.

spim implements both a terminal and a window interface. On Microsoft Windows, Linux, and Mac OS X, the spim program provides the simple terminal interface and the QtSpim program provides the windowing interface.

Happy Birthday SPIM!

spim turned 20 years old January 2010. I wrote the original version of spim as the target machine for my first compiler class at University of Wisconsin, Madison in the spring semester 1990. spim is likely older than most of the students currently using it!

As a birthday present, the 8.0 version of spim has a simpler, less restrictive license, namely the standard BSD license.

QtSpim

The newest version of spim is called QtSpim, and unlike all of the other version, it runs on Microsoft Windows, Mac OS X, and Linux—the same source code and the same user interface on all three platforms! QtSpim is the version of spim that currently being actively maintaned. The other versions are still available, but please stop using them and move to QtSpim. It has a modern user interface, extensive help, and is consistent across all three platforms. QtSpim makes my life far easier, and will likely improve yours and your students' experience as well.

A compiled, immediately installable version of QtSpim is available for Microsoft Windows, Mac OS X, and Linux can be downloaded from: https://sourceforge.net/projects/spimsimulator/files/. Full source code is also available (to compile QtSpim, you need Nokia's Qt framework, a very nice cross-platform UI framework that can be downloaded from here).

Older Versions of SPIM

The information in this shaded box describes the older versions of SPIM. Please use QtSpim instead.
Most Recent Versions of SPIM
PlatformProgramFormFile
Unix or Linux system
Mac OS X
spim
xspim
Source code http://spimsimulator.svn.sourceforge.net/viewvc/spimsimulator/
Microsoft Windows

(spim 7.0 and later versions no longer run on Windows 95/98. Use version 6.5 or earlier.)

PCSpimExecutablehttp://sourceforge.net/projects/spimsimulator/files/PCSpim_9.0.zip/download
Source code http://spimsimulator.svn.sourceforge.net/viewvc/spimsimulator/
  • To run spim or xspim on a Unix, Linux, or Mac OS X system, get the source code from the SourceForge repository and compile it for your system.

  • To run PCspim under Microsoft Windows, download the file http://sourceforge.net/projects/spimsimulator/files/PCSpim_9.0.zip/download, unzip it, and click on setup.exe.

  • Source for the Microsoft Windows version (PCspim) is available SourceForge repository.

  • There is no native Macintosh version of spim (but there is a QtSpim version). However, xspim compiles and runs on Mac OS X, if you can find a way to install the Xaw library.

Installing Older Versions of SPIM

Microsoft Windows

  1. To run PCspim under Microsoft Windows, download the file http://sourceforge.net/projects/spimsimulator/files/PCSpim_9.0.zip/download.

  2. Unzip the file.

  3. Click on the setup.exe program.

Unix, Linux, or Mac OS X

(Note: the directions changed slightly for version 7.2, to reflect a new directory structure. Please read carefully.)

Installation is a bit more complex for a Unix or Linux system, as you need to compile the program for your particular computer and operating system.

  1. Download the files from the SourceForge repository. You don't need the Boneyard directory, which contains old versions, but the other directories are useful.

  2. The simple terminal interface is contained in the spim-8.0/spim directory and the X-windows interfaces is in the spim-8.0/xspim directory.The other directories are described in the README file.

  3. Next, you must set the directories in which spim will be installed by editing the Makefile (the file that contains instructions on building spim). In general, if you are installing spim and want the windowing version (xspim), edit the file xspim/Imakefile. If you don't want xspim or are running on a system without X-windows installed, you use the file spim/Makefile.
    The programs are installed in standard locations, but you can change the pathnames to other locations:

    EXCEPTION_DIR -- The full pathname of the directory in which to install the spim exception handler (exceptions.s).

    BIN_DIR -- The full pathname of the directory in which spim and xspim should be installed.

    MAN_DIR -- The full pathname of the directory in which the manual pages for spim and xspim should be installed.
    In general, the remaining parameters in a Makefile need not be changed.

  4. Then, if you are building xspim, change to the spim-8.0/xspim directory and type:
    % xmkmf
    % make
    If you do not have a copy of xmkmf, you can use the Makefile in the xspim directory, but beware that it may not work on your system because the paths to the X windows libraries could be different.

  5. If you do not have X-windows, change to thespim-8.0/spim directory, edit Makefile, and type:
    % make

  6. To run spim or xspim, the exception handler must be installed in the directory specified by the variable EXCEPTION_DIR in the Makefile. If the file exception.s is not installed, spim and xspim fail before they start running. You can either install this file by hand or by typing:
    % make install
    which also installs spim or xspim, and the manual pages in the directories that you set (above). You may need root permission to install these files, in which case type:
    % sudo make install

  7. To test that spim is correctly built, change to the spim-8.0/spim directory and type:
    % make test
    and examine the output of the test. (Note: the exception handler must be installed before running the test.)

Memory

Addressing the problem of nested locks and unlocks can be straightforward (although tedious) by employing various methods, but these intrude upon the readability of the associated code block and require awareness and discipline on the part of the coder.

Memory leaks and stale references[edit]

Awareness and discipline are also necessary to avoid memory 'leaks' (failure to deallocate within the scope of the allocation) and to avoid references to stale handles after release (which usually resulted in a hard crash—annoying on a single-tasking system, potentially disastrous if other programs are running).

Switcher[edit]

The situation worsened with the advent of Switcher, which was a way for a Mac with 512KB or more of memory to run multiple applications at once.[7] This was a necessary step forward for users, who found the one-app-at-a-time approach very limiting. Because Apple was now committed to its memory management model, as well as compatibility with existing applications, it was forced to adopt a scheme where each application was allocated its own heap from the available RAM.[8]The amount of actual RAM allocated to each heap was set by a value coded into the metadata of each application, set by the programmer. Sometimes this value wasn't enough for particular kinds of work, so the value setting had to be exposed to the user to allow them to tweak the heap size to suit their own requirements. While popular among 'power users', this exposure of a technical implementation detail was against the grain of the Mac user philosophy. Apart from exposing users to esoteric technicalities, it was inefficient, since an application would be made to grab all of its allotted RAM, even if it left most of it subsequently unused. Another application might be memory starved, but would be unable to utilize the free memory 'owned' by another application.[3]

While an application could not beneficially utilize a sister application's heap, it could certainly destroy it, typically by inadvertently writing to a nonsense address. An application accidentally treating a fragment of text or image, or an unassigned location as a pointer could easily overwrite the code or data of other applications or even the OS, leaving 'lurkers' even after the program was exited. Such problems could be extremely difficult to analyze and correct.

Switcher evolved into MultiFinder in System 4.2, which became the Process Manager in System 7, and by then the scheme was long entrenched. Apple made some attempts to work around the obvious limitations – temporary memory was one, where an application could 'borrow' free RAM that lay outside of its heap for short periods, but this was unpopular with programmers so it largely failed to solve the problems. Apple's System 7 Tune-up addon added a 'minimum' memory size and a 'preferred' size—if the preferred amount of memory was not available, the program could launch in the minimum space, possibly with reduced functionality. This was incorporated into the standard OS starting with System 7.1, but still did not address the root problem.[9]

Virtual memory schemes, which made more memory available by paging unused portions of memory to disk, were made available by third-party utilities like Connectix Virtual, and then by Apple in System 7. This increased Macintosh memory capacity at a performance cost, but did not add protected memory or prevent the memory manager's heap compaction that would invalidate some pointers.

32-bit clean[edit]

Originally the Macintosh had 128 kB of RAM, with a limit of 512 kB. This was increased to 4 MB upon the introduction of the Macintosh Plus. These Macintosh computers used the 68000 CPU, a 32-bit processor, but only had 24 physical address lines. The 24 lines allowed the processor to address up to 16 MB of memory (224 bytes), which was seen as a sufficient amount at the time. The RAM limit in the Macintosh design was 4 MB of RAM and 4 MB of ROM, because of the structure of the memory map.[10] This was fixed by changing the memory map with the Macintosh II and the Macintosh Portable, allowing up to 8 MB of RAM.

Because memory was a scarce resource, the authors of the Mac OS decided to take advantage of the unused byte in each address. The original Memory Manager (up until the advent of System 7) placed flags in the high 8 bits of each 32-bit pointer and handle. Each address contained flags such as 'locked', 'purgeable', or 'resource', which were stored in the master pointer table. When used as an actual address, these flags were masked off and ignored by the CPU.[4]

While a good use of very limited RAM space, this design caused problems when Apple introduced the Macintosh II, which used the 32-bit Motorola 68020 CPU. The 68020 had 32 physical address lines which could address up to 4 GB (232 bytes) of memory. The flags that the Memory Manager stored in the high byte of each pointer and handle were significant now, and could lead to addressing errors.

In theory, the architects of the Macintosh system software were free to change the 'flags in the high byte' scheme to avoid this problem, and they did. For example, on the Macintosh IIci and later machines, HLock() and other APIs were rewritten to implement handle locking in a way other than flagging the high bits of handles. But many Macintosh application programmers and a great deal of the Macintosh system software code itself accessed the flags directly rather than using the APIs, such as HLock(), which had been provided to manipulate them. By doing this they rendered their applications incompatible with true 32-bit addressing, and this became known as not being '32-bit clean'.

In order to stop continual system crashes caused by this issue, System 6 and earlier running on a 68020 or a 68030 would force the machine into 24-bit mode, and would only recognize and address the first 8 megabytes of RAM, an obvious flaw in machines whose hardware was wired to accept up to 128 MB RAM – and whose product literature advertised this capability. With System 7, the Mac system software was finally made 32-bit clean, but there were still the problem of dirty ROMs. The problem was that the decision to use 24-bit or 32-bit addressing has to be made very early in the boot process, when the ROM routines initialized the Memory Manager to set up a basic Mac environment where NuBus ROMs and disk drivers are loaded and executed. Older ROMs did not have any 32-bit Memory Manager support and so was not possible to boot into 32-bit mode. Surprisingly, the first solution to this flaw was published by software utility company Connectix, whose 1991 product MODE32 reinitialized the Memory Manager and repeated early parts of the Mac boot process, allowing the system to boot into 32-bit mode and enabling the use of all the RAM in the machine. Apple licensed the software from Connectix later in 1991 and distributed it for free. The Macintosh IIci and later Motorola based Macintosh computers had 32-bit clean ROMs.

It was quite a while before applications were updated to remove all 24-bit dependencies, and System 7 provided a way to switch back to 24-bit mode if application incompatibilities were found.[3] By the time of migration to the PowerPC and System 7.1.2, 32-bit cleanliness was mandatory for creating native applications and even later Motorola 68040 based Macs could not support 24-bit mode.[6][11]

Object orientation[edit]

The rise of object-oriented languages for programming the Mac – first Object Pascal, then later C++ – also caused problems for the memory model adopted. At first, it would seem natural that objects would be implemented via handles, to gain the advantage of being relocatable. These languages, as they were originally designed, used pointers for objects, which would lead to fragmentation issues. A solution, implemented by the THINK (later Symantec) compilers, was to use Handles internally for objects, but use a pointer syntax to access them. This seemed a good idea at first, but soon deep problems emerged, since programmers could not tell whether they were dealing with a relocatable or fixed block, and so had no way to know whether to take on the task of locking objects or not. Needless to say this led to huge numbers of bugs and problems with these early object implementations. Later compilers did not attempt to do this, but used real pointers, often implementing their own memory allocation schemes to work around the Mac OS memory model.

While the Mac OS memory model, with all its inherent problems, remained this way right through to Mac OS 9, due to severe application compatibility constraints, the increasing availability of cheap RAM meant that by and large most users could upgrade their way out of a corner. The memory was not used efficiently, but it was abundant enough that the issue never became critical. This is ironic given that the purpose of the original design was to maximise the use of very limited amounts of memory. Mac OS X finally did away with the whole scheme, implementing a modern sparse virtual memory scheme. A subset of the older memory model APIs still exists for compatibility as part of Carbon, but maps to the modern memory manager (a thread-safe malloc implementation) underneath.[6] Apple recommends that Mac OS X code use malloc and free 'almost exclusively'.[12]

References[edit]

  1. ^Hertzfeld, Andy (September 1983), The Original Macintosh: We're Not Hackers!, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  2. ^Hertzfeld, Andy (January 1982), The Original Macintosh: Hungarian, archived from the original on June 19, 2010, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  3. ^ abcmemorymanagement.org (December 15, 2000), Memory management in Mac OS, archived from the original on May 16, 2010, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  4. ^ abHertzfeld, Andy, The Original Macintosh: Mea Culpa, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  5. ^Apple Computer (October 1, 1985), Technical Note OV09: Debugging With PurgeMem and CompactMem, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  6. ^ abcLegacy Memory Manager Reference, Apple Inc., June 27, 2007, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  7. ^Hertzfeld, Andy (October 1984), The Original Macintosh: Switcher, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  8. ^Mindfire Solutions (March 6, 2002), Memory Management in Mac OS(PDF), p. 2, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  9. ^'System 7.1 upgrade guide'(PDF). Archived from the original(PDF) on March 4, 2016. Retrieved May 26, 2015.
  10. ^'memory maps'. Osdata.com. March 28, 2001. Retrieved May 11, 2010.CS1 maint: discouraged parameter (link)
  11. ^Apple Computer (January 1, 1991), Technical Note ME13: Memory Manager Compatibility, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  12. ^Memory Allocation Recommendations on OS X, Apple Inc, July 12, 2005, retrieved September 22, 2009CS1 maint: discouraged parameter (link)

External links[edit]

  • Macintosh: ROM Size for Various Models, Apple Inc, August 23, 2000, retrieved September 22, 2009CS1 maint: discouraged parameter (link)
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Classic_Mac_OS_memory_management&oldid=1008965847'

James Larus
spim@larusstone.org

Microsoft Research
Formerly: Professor, Computer Sciences Department, University of Wisconsin-Madison

spim has moved to SourceForge.org. New versions of spim are at that site. This site only contains old versions of the simulator.

Why move? SourceForge offers a number of services, such as a source code repository and collaborative tools, that make it easier to share code with other developers. Now that spim has an open source license, the time has come to move off a 20-year old web site and join the 21st century.

Table of Contents

What's New?

QtSpim is a new user interface for spim built on the Qt UI framework. Qt is cross-platform, so the same user iterface and same code will run on Windows, Linux, and Mac OS X (yeah!). Moreover, the interface is clean and up-to-date (unlike the archaic X windows interface).

Spim has moved to SourceForge! The source code for all version of spim are in an SVN repository and compiled version are available for download. There is also a bug tracker and discussion forum.

spim is a self-contained simulator that runs MIPS32 programs. It reads and executes assembly language programs written for this processor. spim also provides a simple debugger and minimal set of operating system services. spim does not execute binary (compiled) programs.

spim implements almost the entire MIPS32 assembler-extended instruction set. (It omits most floating point comparisons and rounding modes and the memory system page tables.) The MIPS architecture has several variants that differ in various ways (e.g., the MIPS64 architecture supports 64-bit integers and addresses), which means that spim will not run programs compiled for all MIPS processors. MIPS compilers also generate a number of assembler directives that spim cannot process. These directives usually can be safely ignored.

Earlier versions of spim (before 7.0) implemented the MIPS-I instruction set used on the MIPS R2000/R3000 computers. This architecture is obsolete (though, never surpassed for its simplicity and elegance). spim now supports the more modern MIPS32 architecture, which is the MIPS-I instruction set augmented with a large number of occasionally useful instructions. MIPS code from earlier versions of SPIM should run without changes, except code that handles exceptions and interrupts. This part of the architecture changed over time (and was poorly implemented in earlier versions of spim). This type of code will need to be updated. Examples of new exception handling are in the files: exceptions.s and Tests/tt.io.s.

spim comes with complete source code and documentation. It also include a torture test to verify a port to a new machine.

spim implements both a terminal and a window interface. On Microsoft Windows, Linux, and Mac OS X, the spim program provides the simple terminal interface and the QtSpim program provides the windowing interface.

Happy Birthday SPIM!

spim turned 20 years old January 2010. I wrote the original version of spim as the target machine for my first compiler class at University of Wisconsin, Madison in the spring semester 1990. spim is likely older than most of the students currently using it!

As a birthday present, the 8.0 version of spim has a simpler, less restrictive license, namely the standard BSD license.

QtSpim

The newest version of spim is called QtSpim, and unlike all of the other version, it runs on Microsoft Windows, Mac OS X, and Linux—the same source code and the same user interface on all three platforms! QtSpim is the version of spim that currently being actively maintaned. The other versions are still available, but please stop using them and move to QtSpim. It has a modern user interface, extensive help, and is consistent across all three platforms. QtSpim makes my life far easier, and will likely improve yours and your students' experience as well.

A compiled, immediately installable version of QtSpim is available for Microsoft Windows, Mac OS X, and Linux can be downloaded from: https://sourceforge.net/projects/spimsimulator/files/. Full source code is also available (to compile QtSpim, you need Nokia's Qt framework, a very nice cross-platform UI framework that can be downloaded from here).

Older Versions of SPIM

The information in this shaded box describes the older versions of SPIM. Please use QtSpim instead.
Most Recent Versions of SPIM
PlatformProgramFormFile
Unix or Linux system
Mac OS X
spim
xspim
Source code http://spimsimulator.svn.sourceforge.net/viewvc/spimsimulator/
Microsoft Windows

(spim 7.0 and later versions no longer run on Windows 95/98. Use version 6.5 or earlier.)

PCSpimExecutablehttp://sourceforge.net/projects/spimsimulator/files/PCSpim_9.0.zip/download
Source code http://spimsimulator.svn.sourceforge.net/viewvc/spimsimulator/
  • To run spim or xspim on a Unix, Linux, or Mac OS X system, get the source code from the SourceForge repository and compile it for your system.

  • To run PCspim under Microsoft Windows, download the file http://sourceforge.net/projects/spimsimulator/files/PCSpim_9.0.zip/download, unzip it, and click on setup.exe.

  • Source for the Microsoft Windows version (PCspim) is available SourceForge repository.

  • There is no native Macintosh version of spim (but there is a QtSpim version). However, xspim compiles and runs on Mac OS X, if you can find a way to install the Xaw library.

Installing Older Versions of SPIM

Microsoft Windows

  1. To run PCspim under Microsoft Windows, download the file http://sourceforge.net/projects/spimsimulator/files/PCSpim_9.0.zip/download.

  2. Unzip the file.

  3. Click on the setup.exe program.

Unix, Linux, or Mac OS X

(Note: the directions changed slightly for version 7.2, to reflect a new directory structure. Please read carefully.)

Installation is a bit more complex for a Unix or Linux system, as you need to compile the program for your particular computer and operating system.

  1. Download the files from the SourceForge repository. You don't need the Boneyard directory, which contains old versions, but the other directories are useful.

  2. The simple terminal interface is contained in the spim-8.0/spim directory and the X-windows interfaces is in the spim-8.0/xspim directory.The other directories are described in the README file.

  3. Next, you must set the directories in which spim will be installed by editing the Makefile (the file that contains instructions on building spim). In general, if you are installing spim and want the windowing version (xspim), edit the file xspim/Imakefile. If you don't want xspim or are running on a system without X-windows installed, you use the file spim/Makefile.
    The programs are installed in standard locations, but you can change the pathnames to other locations:

    EXCEPTION_DIR -- The full pathname of the directory in which to install the spim exception handler (exceptions.s).

    BIN_DIR -- The full pathname of the directory in which spim and xspim should be installed.

    MAN_DIR -- The full pathname of the directory in which the manual pages for spim and xspim should be installed.
    In general, the remaining parameters in a Makefile need not be changed.

  4. Then, if you are building xspim, change to the spim-8.0/xspim directory and type:
    % xmkmf
    % make
    If you do not have a copy of xmkmf, you can use the Makefile in the xspim directory, but beware that it may not work on your system because the paths to the X windows libraries could be different.

  5. If you do not have X-windows, change to thespim-8.0/spim directory, edit Makefile, and type:
    % make

  6. To run spim or xspim, the exception handler must be installed in the directory specified by the variable EXCEPTION_DIR in the Makefile. If the file exception.s is not installed, spim and xspim fail before they start running. You can either install this file by hand or by typing:
    % make install
    which also installs spim or xspim, and the manual pages in the directories that you set (above). You may need root permission to install these files, in which case type:
    % sudo make install

  7. To test that spim is correctly built, change to the spim-8.0/spim directory and type:
    % make test
    and examine the output of the test. (Note: the exception handler must be installed before running the test.)

Further Information

  • Elsevier (aka Morgan Kaufmann) has generously provided the spim documentation (Appendix A) from the third edition of Hennessy & Patterson, Computer Organization and Design: The Hardware/Software Interface. This documentation is far more complete and up-to-date than the documentation included in the spim distribution. The COD documentation includes:

    • Appendix A: Assemblers, Linkers, and the SPIM Simulator (PDF). An overview and reference manual for spim and the MIPS32 instruction set.

    • Getting Started with spim (PDF). Overview of the console version of spim (both Unix and Windows).

    • Getting Started with xspim (PDF). Overview of the X-windows version of spim.

    • Getting Starting with PCSpim (PDF). Overview of the Microsoft Windows version of spim.

    • SPIM Command-Line Options (PDF). Overview of the command line options of spim (all versions).

  • The documentation included with spim is also online (as a postscript or Adobe PDF file). This document is for the original spim (pre-version 7.0), which simulated the MIPS-I architecture rather than MIPS32, and so differs in many minor aspects from the current version of spim Appendix A of Hennessy & Patterson, Computer Organization and Design: The Hardware/Software Interface (above), is more up-to-date and correct.

  • The best book I have seen on MIPS programming is: Dominic Sweetman, See MIPS Run, Morgan Kaufmann, San Francisco, CA, 1999, ISBN 1-55860-410-3.

  • MIPS, Inc. has excellent free documentation on the MIPS32 architecture on their website http://www.mips.com/products/product-materials/processor/mips-architecture/:

  • An old reference manual for the MIPS architecture (including processors subsequent to the R2000/R3000) is: Gerry Kane and Joe Heinrich, MIPS RISC Architecture, Prentice Hall, Englewood Cliffs, N.J. 07632 ISBN 0-13-1059254.

  • Another good book for the MIPS R2000 and R3000 is: Erin Farquhar and Philip Bunce, The MIPS Programmer's Handbook, Morgan Kaufmann, San Francisco, CA, 1994, ISBN 1-55860-297-6.

  • The GNU C compiler can generate code for the MIPS R3000 and can be used as a cross compiler. A retargeted port of gcc is available on the MPS Resource Page. I have not used this compiler.

  • Downcast Systems offers a very nice text editor for MIPS assembly code called MIPSter. It has syntax highlight, MIPS-specific help, good integration with SPIM, and a number of other features to make it easier to write assembly code. MIPSter is an inexpensive commercial product, and it offers a limited time trial version.

  • Andrea Grandi ported SPIM to the Nokia 770/800 Internet Tablet, so you never need to be without the ability to run MIPS programs. The port of SPIM is available at: http://www.ptlug.org/wiki/SPIM_N770.

Changes in Latest Version

The current version of spim is 9.0 (January 2011), which is a major release that introduces QtSpim and fixes some bugs in all versions:

  • Add Debian package and Linux desktop metadata.

  • Moved SVN repository to SourceForge.

  • Fit and finish bugs in PCSpim and error parsing quoted command line arguments.

  • QtSpim!!!

  • Single stepping hung at breakpoint.

  • Did not display first 4K of the stack.

  • Ported PCSpim to VisualStudio 2010.

  • Fixed type errors so code compiles under Linux and on x64 systems.

  • Moved version information into CPU/version.h and eliminated old, ad-hoc Configure file for spim and xpsim.

The current version of spim is 8.0 (January 2010), which is a minor release that cleans up bugs in 7.5 and moves to a BSD license:

  • Changed install path from /usr to /usr/local and removed -D option to install command (which doesn't exists on Mac OS X).

  • Change license to a BSD license, update copyright notices, and eliminated references to my old email address.

  • Simplify alignment of data on stack to ensure enough room is left for environment and args at top of stack.

  • Initialize stack with arguments when running program from run dialog.

  • read_input filled buffer with last character of file not terminated by newline.

  • Links to MIPS documentation were broken.

  • Did not return value from exit syscall.

The current version of spim is 7.5 (August 2009), which is a minor release that cleans up bugs in 7.4:

  • Correct problem with installer script that did not install appropriate versions of msvcrt and mfc dlls for Visual Studio 9.0.

  • Fix install scripts to put exceptions.s at /usr/lib/spim on Linux.

  • Fixed major memory leak caused by overwritten instructions not being freed.

  • Force redisplay of data segment in situations when register values (such as $sp) have changed.

  • Properly initialize PC at first invocation of step operation on PCSPim.

  • Fixed bug in Xxpim that caused the step commend to reinitialize the stack.

The current version of spim is 7.4 (January 2009), which is a minor release that cleans up bugs in 7.3:

1/14/09: Released new version of pcspim.zip to correct problem with installer script that did not install appropriate versions of msvcrt and mfc dlls.
1/21/09: Released new version of spim.tar.Z and spim.tar.gz to correct problem with install command for spim program (but not xspim).

  • Fixed install directories for Linux systems.

  • Retained command line arguments in second and subsequent runs.

  • Bug in overflow from low-order word in MADD, MSUB.

  • Bug in decoding SPECIAL2 instructions (e.g. madd).

Memory Leak (david Estes-smargiassi) Mac Os Download

The previous version of spim is 7.3 (August 2006), which is a minor release that cleans up a number of bugs in 7.2:

  • Fix for flex 2.5.33 (internal change broke spim's scanner).

  • Exception handler can be a semicolon-separated list of files that will be loaded in order. On Unix, SPIM_EXCEPTION_HANDLER environment variable is consulted before command line arguments.

  • Memory corruption caused spim to crash when label was defined twice in succession.

  • PCSpim updates register and memory display after a parse error while reading a file.

  • Eliminated unnecessary null char between strings in list of strings produced by .asciiz.

  • Makefiles (in spim/ and xspim/) now contain clearly defined paths for installing executables, exception handler, and man pages. The man pages are no longer installed by the 'make install' command.

  • Change psfig to epsfig in spim.tex (does anyone still use this obsolete documentation?).

The previous version of spim is 7.2.1 (August 2005), which is a minor release that cleans up a number of bugs in 7.1:

  • Fixed multiple problems in memory mapped IO in xspim and spim. (Note: to make programming uniform across all three platforms, memory mapped IO now follows'Unix' handling of carriage return (CR) and new line (NL) characters . On input, a CR is translated to a NL, and on output, a CR is printed after a NL. This was previously true for PCSpim and xspim, but not spim.)

  • Fixed bug in indexed address computation in LW and SW instructions.

  • Eliminated non-POSIX flags IUCLC and IXANY to facilitate port to Mac OS X.

  • Use termios(3) library calls instead of IOCTLs to fix bug introduced in port from termio to termios struct.

  • Test default case for jalr, without default $rd (=31).

  • Trap handler in test extracted wrong bits from ExcCode field of Cause register.

  • Pervasive restructuring of files to put 3 UIs (spim, xspim, PCSpim) in separate directories and cleanup organization and Makefiles.

  • Use correct help file in install process.

  • Added work-around for bug in flex 2.5.31 that left yytext_ptr undefined.

  • Epilogue code restored $at register, then used a pseduo instructions that smashed it.

  • Cleared filename when reinitializing PCSpim, which broke next reload command.

The previous version of spim is 7.1 (January 2005), which is a minor release that cleans up a number of bugs in 7.0:

  • Minor cleanup.

  • Switched Windows installer to Microsoft .msi installer, from InstallShield.

  • exceptions.s used wrong mask for exception cause field.

  • Clearing the transmitter or receiver interrupt enable bits also clear interrupt pending bits in Cause register.

  • Code to poll for a console input character in X windows blocked and prevented any output until input occured.

  • Type of 'mul' instruction was wrong, which lead to it being printed without destination register.

  • Print underlying instruction, not breakpoint.

  • Unparing error that unparsed beq as beql.

  • Eliminated dependence on obsolete termio.h in favor of POSIX termios.h since Mac OS X doesn't have termio.h any more.

  • Fix null pointer problem if no entries in registry. Boreek mac os.

  • Turn off EXL bit after break instruction, since break is handled by spim, not MIPS, code and the bit was never cleared.

  • Set default path for exceptions.s to C:Program FilesPCSpim, the default installation directory.

  • Test for SQRT.S used double constant, which failed on SPARC (but not x86).

The previous version of spim is 7.0 (August 2004), which is a major release that contains a significant number of changes from version 6.5:

  • Upgraded simulator to MIPS32, Version 1 architecture (except details of FPU and memory).

  • Exceptions and interrupts reimplemented, to make them closer to the actual hardware.

  • Memory mapped IO console reimplemented to make it work properly.

  • Implemented timer in CPU.

  • Renamed 'trap' to 'exception' to correspond to MIPS terminology.

  • Introduced short forms of command line arguments and dropped need for '-file' argument.

  • Major internal cleanup and reorganization of code to eliminate unused code and simplify implementation.

  • PCSpim prompts about reinitialization when file reloaded.

  • PCSpim lets user set font.

  • Word align all segment boundaries and ensure sbrk returns word-aligned addresses.

  • Added new syscall (EXIT2_SYSCALL) that returns value from SPIM.

  • Improved implementation of delayed load instructions.

  • Refactored the test cases, so that endian-independent code is in tt.core.s

  • Many small bug fixes.

Outstanding bugs in 7.0:

  • The trap handler (exceptions.s) fails when the trapping instruction is in the delay slot of a branch or jump. The trap handler returns by simplemindedly adding 4 to the EPC (which is the branch's address in this case), so it does not return to the instruction executed after the trapping instruction.

  • Handling of newlines and carriage returns is inconsistent between platforms. When a program prints a newline, PCSpim also prints a carriage return, spim and xspim don't. Or, is this consistent with the underlying platform?

Memory Leak (david Estes-smargiassi) Mac Os File

The previous version of spim is 6.5 (January 2003), which contains the following changes from version 6.4:

  • If started program is started with only one argument, assume it is a file name.

  • Added Alt-F4 shortcut to PCSpim.

  • Fixed trap.handler to return to instruction at EPC on interrupt.

  • Fixed (real!) hardware exception on integer overflow in division.

  • -trap_file did not properly parse argument in xspim.

  • Fixed printing of error on last line without a carriage return.

  • Print proper registers when printing hex FP numbers.

  • Properly zero newly allocated memory.

  • Added nops (addu $0, $0, 0) to trap handler, so that it works properly in bare mode!

  • PCSPIM.HLP file was corrupted.

The previous version of spim is 6.4 (January 2002), which contains the following changes from version 6.3:

  • PCSpim no longer shifts the focus of the register and data segments when values change.

  • Fixed bug in the expansion of USH pseudo-op.

  • Add system calls for open, close, read, and write.

  • Fixed the Configure file to work with Mac OSX.

  • Made the REM pseudo-op require 3 arguments.

  • Fixed PCSpim dumping code to dump contents of console window.

  • Treat LUI's immediate value as unsigned, as it is not sign extended.

  • More error checking for malformed programs.

  • Make symbol 'main' as global.

  • Avoid clearing last few bytes of data segments when they expand.

  • Check that high-order 4 bits in jump instruction's PC match bits in target PC.

The previous version of spim is 6.3 (January 2001), which contains the following changes from version 6.2:

  • PCSpim interface simplified to 4 fixed panes, similar to xspim, which permit cut and paste.

  • PCSpim console stays on the screen after assembly program terminates.

  • Social media remote mac os. Comments in assembly source displayed in text segment.

  • NOP is standardized to sll $0 $0 0 (= 0x00000000)

  • Fixed several bugs and missed optimization in computing immediate values in lw/sw instruction sequences.

  • High 2 bits in negative branch offsets were incorrect.

  • Display floating point registers with up to 18 digits of precision.

  • New spim command (print_all_regs) prints all registers.

  • Minor changes to compile spim under cygwin for Windows.

  • Validate the range of immediate values in MIPS (but not pseudo) instructions.

  • Fixed display of stack with non-word aligned $sp.

  • New flags:

    • -delayed-branches Simulate MIPS delayed control transfers for branches, jumps, and calls

    • -delayed-loads Simulate MIPS non-interlocked loads.

Copyright

spim is copyrighted by James Larus and distributed under a BSD license.

Copyright (c) 1990-2010, James R. Larus. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the James R. Larus nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

Memory Leak (david Estes-smargiassi) Mac Os Update

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The DOS and Windows ports were done by David A. Carley and are copyrighted y Morgan Kaufmann Publishers.

SPIMSAL Note

Memory Leak (david Estes-smargiassi) Mac Os Images

spimsal is an old version of spim that ran on PCs running Windows 3.1 and Macintoshes. spimsal implements an extended version of the MIPS instruction set and is based on an old version of spim. It also does NOT run under Windows 95 or Windows NT.





broken image