Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Q&As > Legacy Documents > Mac OS 9 & Earlier >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Navigation Services and memFullErr

Q When I make one of the Navigation Services browsing calls, like NavGetFolder, nothing happens on the screen and I get -108 (memFullErr) as a return value, even though MacsBug tells me there are megabytes of free memory in the application, system, and process manager heaps. Why?

A There are two known potential reasons for this phenomemon:
  • The classic 68K glue (a.k.a. Navigation.o) for Navigation Services 1.0 makes Code Fragment Manager and Mixed Mode Manager calls to invoke the appropriate routine in the Navigation Services shared library. The glue starts out with the assumption that it will fail due to memFullErr. If, however, it fails for one of several other reasons, it doesn't update its assumption and reports the failure as if it exhausted available memory. One problem which is masked this way is the absence of the shared library. By calling NavServicesAvailable before attempting to use the rest of Nav, as documented, you will know that Nav is not installed and avoid the confusing memFullErr.

  • Navigation Services is able to make a reasonable estimate of the minimum amount of memory it will need to display a browsing dialog. If this amount of memory is not available, the call returns memFullErr without any on-screen evidence of the failure. If your application failed to call MaxApplZone before calling Nav, Nav will be fooled into believing your heap is tiny or nearly full. MaxApplZone is an important part of a balanced breakfast. Call it.

[Jul 06 1998]