Article # 106, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
dealing with heap allocation warnings on the emulator
This article suggests ways to reduce warnings from swat about GLOBAL_HEAP_IS_CONGESTED_SO_THREAD_IS_SLEEPING. This is caused when an allocation on the global heap has failed and the caller passed HAF_NO_ERR. The current thread gets slept in the hopes that memory will become available when other threads complete their tasks. To avoid this situation, accept errors when calling MemAlloc or MemReAlloc, and then try to allocate a smaller piece of memory or notify the user that the current operation has failed. For emulators of XIP systems, this warning is occasionally caused by the large sized (10-16K) code resources. Here are some suggestions for clearing up conventional memory to allow more resources to be loaded: - Move DOS drivers and TSRs to high memory. How you do this depends on the version of DOS (In MS-DOS 6, you can use Memmaker). - If using Netware drivers, you can reduce the size of IPXODI with the "/a" or "/d" option. If you don't use SPX, then the "/a" option will save you 9K. - Have Geos load its XMS driver by adding the following to the emulator's .ini file: [system] memory = { diskec.geo xmsec.geo } - If possible, don't load unecessary drivers (CD-ROM, network). - System handles take up a small amount of memory so, during development, you can reduce the number of handles (default is 3000) by adding: [system] handles = 2000