Re: Question about output data streaming
Re: Question about output data streaming
- Subject: Re: Question about output data streaming
- From: Jeff Moore <email@hidden>
- Date: Wed, 07 Jan 2009 22:48:04 -0800
On Jan 7, 2009, at 10:21 PM, David Tan wrote: Thanks for your confirmation! The reason why I asked this question is that: After calling Float32ToNativeInt32(), I cannot see continuous integer in the conversion result. The result seems very discrete and I cannot see any pattern. Do you have any idea of it?
How are you looking at the data? Are you sure it's not endian flipped? Here I want to ask another question: I’m working on a FireWire audio driver and have some source code of a user-mode driver. I inherited most of the logic of the DCL program from the user-mode driver. However I often encountered odd issues while debugging the kernel driver. Some pointer variables will be changed to obvious protected memory (e.g. 0x01, 0x40) and calling these pointers again will cause the OS panic. However, I don’t there’s any code to change them to such odd address.
That sounds like some kind of memory scribbler.
The only clue I can get now is that: To setup DCL program, the user-mode driver will allocate some memory about 200 pages (4096 bytes / page). I’m not sure if it’s too big for kernel memory. If the kernel doesn’t like such a large memory allocation, it might be a mess while it does some memory duplication. And that’s why some pointer variables will get weird address. I’m suspicious of it because the fist allocation of 200 pages seems OK, but the second time always fails. Could you give me some clarification about it? Thanks a lot!
200 * 4096 = 800k
That's might be a bit on the big side, but it isn't an unreasonable amount of memory. I'd bet that depending on what kind of memory your are allocating and what you are calling to do it, you might be getting a failure. For example, if you needed all that memory to be physically contiguous, you might see a failure as kernel memory gets more fragmented.
BTW, if you really do need to have that memory be physically contiguous (and I don't think the FireWire controllers in our machines do, but just in case), your best bet is to try to allocate the memory as close to boot time as possible before kernel memory gets too fragmented and your request is most likely to succeed. --
Jeff Moore Core Audio Apple
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden