Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!pt.cs.cmu.edu!andrew.cmu.edu!ml10+ From: ml10+@andrew.cmu.edu (Michael A. Libes) Newsgroups: comp.sys.mac.programmer Subject: Multifinder "feature" Message-ID: <8ZSMKFS00Uh7M1D0su@andrew.cmu.edu> Date: 3 Dec 89 20:44:01 GMT Organization: Class of '91, Carnegie Mellon, Pittsburgh, PA Lines: 29 Can someone explain this problem? I am writing a small Multifinder "faceless" background program. My SIZE #-1 resource is set for 8192 bytes and all the flags are set to what is logical. Using MacsBugs, I checked the actual heap zone for the application. Somehow, my program was given an EXTRA 13900 bytes which it doesn't need or use. I tried unsetting the "Background Only" flag in the SIZE resource and ran the program. In this configuration, the program couldn't run, I got an "Out of Application Memory" error. After increasing the requested size to 15K, I ran it again. I put the SIZE resource back to background only and 8K and launched the program. Watching the "About the Finder" dialog, I notice that the Finder says that my program uses up 26K of memory. I only ask for 8K, I only need 8K?!? According to MacsBugs, my program is now getting 8628 bytes LESS than requested. I have subsequently looked at other programs. No program gets all the memory it requests. I assume some memory goes into Multifinder overhead, and some system overhead. Isn't something wrong here? If an application programmer figures that his program uses 50K, and he requests for 52K to be on the safe side, won't he be confused when his program runs out of memory? If you have any idea why this happens, please post so that everyone will learn of this Multifinder "feature." -Lunarmobiscuit (ml10@andrew.cmu.edu)