On 2020-11-29 19:29:55 +0000,
[email protected] said:
I am calling GetNewID(0x5000) rather than just or'ing it with the assigned ID.
SystemUserID() will internally OR the ID passed to it with $0100. That shouldn't ordinarily cause a problem, but it may be useful to keep in
mind when debugging.
I narrowed it down a little more in my code which just confuses me more
;) During bootup the cdev load some dynamic code to handle request events...much like a PIF would do. The PIF and the CDEV will load an additional dynamic code and execute that....and free it when it is
done. Calling the dynamic code from the CDEV seems to have no issues.
It is on returning from the PIF that seems to cause the finder issues.
Are you expecting the memory for the PIF (both the static code/data and
what it dynamically allocated) to be freed by that point? If so, are
you making calls to do that (e.g. calling UserShutDown after the PIF is
done)?
It sounds like you have a fairly complex setup with several things
taking up memory. If I'm understanding right, you have static
code/data in both the CDEV and the PIF, plus memory dynamically
allocated by each of them. You should think about when each of these
are supposed to be deallocated, and make sure that is happening. It
may be helpful to have separate user IDs for these various classes of
memory to help with that (in particular, the CDEV and the PIF should
definitely have distinct user IDs).
It would also be good to check if your problems are due to the amount
of memory actually being allocated, or if the Memory Manager's data
structures are somehow getting corrupted. Is the overall amount of
memory that appears to be used consistent with what you expect for your
program (all components)? The memory stats in the Finder's "About this
Apple IIgs" window gives an overview of how much memory has been
allocated. Debugging tools like Nifty List can give more detailed
info, including a dump of handles for a specific user ID or of all the allocated handles in the system.
--
Stephen Heumann
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)