Group,
I'm new to USB development in general, but not new to Mac programming. My
current project involves creating a dylib that is callable from a Realbasic
program. The dylib is to find a low speed USB data acquisition device that
attaches as a HID, open a connection, send a two byte request to it (via
setReport), read the reply (comes back on an interrupt endpoint), tear down
the interface and return the data to the caller. It doesn't need to be
fast, but it needs to be very stable since it could run for weeks or months
with minimal user attention.
The requirements document that I'm working to indicates the minimum
supported system should be OS X 10.3.9 with 256Mb of RAM. I'm developing
using Xcode 2.4 and building the dylib as a universal binary.
I've based my code on the various developer examples, and I'm not doing
anything exotic. I'll post the exact code, if that's helpful, but just
wanted to describe the situation first and see if anyone has experienced
this before.
When the application is running on the 10.3.9 256Mb machine (B&W G3) we've
set up as a "worst case" test platform, we're getting kernel panics after
approx. 450 samples (the dylib is called on each sample). Specifically, it
seems I'm using up kernel map entries:
panic(cpu 0): zalloc: zone "kernel map entries" empty.
Latest stack backtrace for cpu 0:
Backtrace:
0x00083498 0x0008397C 0x0001EDA4 0x00038BBC 0x0005C03C 0x0005C32C
0x0005AE80 0x00087448
0x0005EA74 0x0005B308 0x002969E4 0x00296764 0x00294220 0x0024D63C
0x004348F8 0x00290B4C
0x00294278 0x0024D63C 0x004348F8 0x00290B4C 0x00294278 0x0024D63C
0x004348F8 0x00290B4C
0x00294278 0x0024D63C 0x0027FCF0 0x0007A0E8 0x00021668 0x0001BCE8
0x0001C0F0 0x00094318
backtrace continues...
Kernel loadable modules in backtrace (with dependencies):
com.apple.iokit.IOHIDFamily(1.3.6)@0x42c000
Proceeding back via exception chain:
Exception state (sv=0x1AAAD780)
PC=0x900078B8; MSR=0x0000F030; DAR=0xEFFFFA40; DSISR=0x42000000;
LR=0x90007438; R1=0xBFFFF590; XCP=0x00000030 (0xC00 - System call)
When I do a zprint, both on the low mem machine and another 10.3.9 machine
with 1Gb RAM, I can see the 'cur in use' number for kernel.map.entries
incrementing each time the dylib is called. Interestingly, I don't see this
incrementing on my 10.4.8 development machine.
I've already exonerated the Realbasic/dylib calling interface by creating a
dylib that only returns random numbers and doesn't use the USB interface.
It runs forever with no problem (no kernel.map.entries increment). As far
as I can tell, I'm releasing all the resources correctly and I don't see
any userspace memory leaks.
Am I reading this right ? Has anyone seen this before ? Any help would be
greatly appreciated.
Thanks,
Rich
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden