Thread View: mod.os.os9
1 messages
1 total messages
Started by os9
Wed, 07 Jan 1987 17:36
OS-9 Discussions, V2 #9
Author: os9
Date: Wed, 07 Jan 1987 17:36
Date: Wed, 07 Jan 1987 17:36
50 lines
2489 bytes
2489 bytes
OS-9 Discussions Wednesday, January 7th 1987 Volume 2 : Issue 9
Today's Topics:
stack usage in device drivers
--------------------------------------------------------------------------
Date: 6 Jan 1987 1345-CST (Tuesday)
From: sun!mcrware!jejones (James Jones)
Subject: stack usage in device drivers
[The following is a reply to a query about stack usage in device drivers.
The author of the query, exunido!res (Ralf Stranzenbach), felt that the
answer would be of general interest, so I forward it to mod.os.os9 as well
as to him...James Jones]
------- Forwarded Message
In system state OS-9/68k only reserves about 2K of stack. Everything in
the kernel, FMs, etc. are very stack conservative. Just a few temps,
register saves and return addresses appear there.
If a driver intends to use a lot of stack, you should consider whether
the stack should really be used. Normally, driver code is not recursively
or indirectly re-entered so there is really no need to keep massive stuff
on the stack. Remember that if the driver sleeps with a big hunk of stack
swallowed, that could be asking for trouble.
My rule of thumb is to reserve the space in driver static storage if the
amount is under 1K. If the data is over 1K or large or transient in nature,
do an F$SrqMem to request the memory from the system. This should eliminate
any question of stack overusage.
------- End of Forwarded Message
-------------------------------------
The views expressed in OS-9 Discussions are those of the individual authors
only.
------
Moderator: John Daleske cbosgd!cbdkc1!daleske daleske@cbdkc1.ATT.COM
Submissions should go to cbosgd!os9 os9@cbosgd.ATT.COM
Comments to the moderator
or to join the mailing cbosgd!os9-request os9-request@cbosgd.ATT.COM
list.
*********************
End of OS-9 Discussions
*********************
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads