Ssim has several limitations that are forced by the nature of the 1 Megabyte real-address space available under MSDOS. No swapping or paging of any kind is attempted by ssim. The amount of virtual address space available to the SPARC program is determined by the amount of free physical memory on the MSDOS host. This version of ssim has the additional limitation that it will not simulate programs requiring more than 64k total text and data space. This limitation may be relaxed in a future version.
All SPARC addresses are related to MSDOS addresses by a single offset which is either added or subtracted. This means that the top of stack is not nearly as high in the address space as on real SPARC hardware with virtual memory. Because of this, (SPARC) stack overflow becomes a real possibility. Ssim does not make any kind of check for stack overflow. When ssim examines a SPARC address for validity, it only checks to see if the corresponding MSDOS address is outside the block allocated for SPARC memory. If so, a segmentation fault is incurred and the program terminates (unless it handles SIGSEGV). Since the beginning of SPARC memory is at address 0x2000, NULL pointer dereferencing will generate a SIGSEGV. Any address from 0x2000 to the top of stack can be read, written and executed. There is no unmapped gap between the top of the heap and bottom of the stack as on real hardware. Alignment restrictions for load and store instructions are enforced by ssim. A SIGBUS results from an unaligned access.