Saad was suggesting that you either build an unmanaged DLL or a managed C++ wrapper, pass chunks of data to it and get the result when finished. This however has the following drawbacks, which you might want to consider before moving to implementation:
- you'll essentially copy all data three times - once from the underlying socket's buffer to a managed array; then from the managed array to the unmanaged buffer; and finally when you're done, from the unmanaged buffer to the resulting array - re-allocating memory (the unmanaged one) with any of the memory allocators I know (and I know a lot) won't guarantee you that memory won't be copied around - when the allocator can't find enough contiguous memory block(s) to coallesce with the initial one, so the buffer gets big enough to fit both the old and the new data it will allocate another bigger chunk and will copy the old memory to it; knowing what final size you're aiming, you're out of luck; also most of the allocators use a single critical section to protect the allocator's internal data structures, so you'll get additional overhead when allocating memory for each realloc Again, if you're really into performance and want to avoid copying memory around, and are willing to work on scattered data, read everything in several (as needed) byte arrays and then work on these. Cheers, Stoyan On 7/6/06, dave wanta <[EMAIL PROTECTED]> wrote:
Hi Saad, hmm...this sounds interesting. Do you have some links you could point me to? or a phrase or 2 I could goole? Also, will there be any issues (perhaps permissions?) if I run this in an ASP.NET app? Cheers! Dave
=================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com