ned@h-three.UUCP (ned) (10/28/88)
I'm developing a Mac driver that needs to allocate (and deallocate) variable sized chunks of memory at interrupt level. I understand the pitfalls of using the standard memory allocation routines in this case, but since I can briefly turn the device's interrupt off at critical times I should be able to safely manage a private storage pool reserved for the driver. Can a separate heap zone and the standard storage allocation utilities be used at interrupt level if the driver guarantees that the device's interrupt will not occur during storage allocation/deallocation? If so, what special considerations should be kept in mind? If not, anyone have any recommendations? I know that I could preallocate buffers and such during driver initialization, but that would complicate the driver and would impose rather arbitrary restrictions on the availability of certain resources. Perhaps the solution is to allocate an adequately large pool of memory at driver initialization and have the driver manage this pool itself with its own routines. Is there a better (i.e. already available) way to solve my problem? Since drivers are for the most part interrupt driven, I would imagine this would be a common problem. Thanks in advance. -- Ned Robie uunet!h-three!ned