Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: [ata-scsi-dev] re-initing IODMACommand
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ata-scsi-dev] re-initing IODMACommand



Hello!
First of all I would say that SCISTask (shadowed by IOSCSITaskIdentifier) class inherits from IODMACommand (on Intel Tiger and possibly on both targets in Leopard) and so you can use something like


	IODMACommand* taskCommand;
	taskCommnad = OSDynamicCast (parallelRequest);

taskCommand->setMemoryDescriptor (GetDataBuffer (parallelRequest));
// obtain SGL
...
instead of allocating your own objects. In this case you must specify your IODMACommand's parameters in IOSCSIPatallelInterfaceController::InitializeDMASpecification().


But this method is "undocumented" and you (as I do) should allocate the pool of IODMACommand objects and initialize these objects only once! (you needn't re-initialize IODMACommand to get physical segments of another IOMemoryDescriptor) and then use:

setMemoryDescriptor (buffer) -- to "attach" new IOMemoryDescriptor to your IODMACommand object,

clearMemoryDescriptor () -- to "detach" one.



On Oct 30, 2007, at 5:30 PM, Alexander von Below wrote:

Hello List,

I need some advice how to re-init the IODMACommand supplied by the IOSCSIParallelInterfaceController.

Our hardware can address up to 47 bits, and currently this is what we do:

if(localIODMACommand && (transferDir != kSCSIDataTransfer_NoDataTransfer)){
localIODMACommand->initWithSpecification (kIODMACommandOutputHost64 ,47,0,IODMACommand::kMapped,0,1);
IOresult=localIODMACommand->prepare(bufferOffset,bytesLeft)
}


However, we observe a memory leak, of size zalloc 256 per re-init.

Could anyone give a hint what we are doing wrong?

Thanks

Alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Ata-scsi-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >[ata-scsi-dev] re-initing IODMACommand (From: Alexander von Below <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.