Assuming you have a segment with a count of 0 :) While a stack will
help localize things initially under heavy pressure you will need to
be smarter (i.e. it is likely that none will be completely unused). As
such you would have to remove all of the items from the queue/stack
for that segment and w
Just coming from the top of my head ...
What about using a dictionary that keeps tracks of the number of
reserved buffers for a given segment ? Something like this :
in ctor():
_tracker = new Dictionary();
in CreateNewSegment():
_tracker.Add(segment, 0);
in CheckOut():
_tracker[chunk.Array]++;
You are right, a stack would offer better locality of data. I am
changing that now.
"For the memory release problem, you could offer a manual TrimExcess()
or a Trim(int segmentCount) method. What do you think ?"
These methods would be very troublesome as you would have to insure
that no buffers
For the memory release problem, you could offer a manual TrimExcess()
or a Trim(int segmentCount) method. What do you think ?
Sébastien
On 8/9/06, Sébastien Lorion <[EMAIL PROTECTED]> wrote:
I really like your solution! Making this class a singleton as Yun Jin
did seems not like a good choice b
I really like your solution! Making this class a singleton as Yun Jin
did seems not like a good choice because different scenarios will most
probably require different parameters.
Maybe a stupid idea, but I think using a stack would provide better
cache locality since it will reuse the last buffe
After some research this seems like a much better method. Here is the
BufferManager class ... you can use the new overloads for send/receive
that take ArraySegments in conjunction with it.
Yun Jin gives a great explanation of the problem I am trying to
resolve here https://blogs.msdn.com/yunjin/a
It may be that the varchar(8000) was being converted to a text field. Try
'varchar(max)' as the datatype and it should work.
Thanks,
Shawn Wildermuth
Wildermuth Consulting Services, LLC
http://adoguy.com
C# MVP, MCSD.NET, Author and Speaker
> -Original Message-
> From: Discussion of a
We have a stored procedure that uses a varchar(8000) as an output parameter.
The stored proc was written in SQL 2000, and is called by .Net 1.0 clients.
We copied the stored proc to a test server that has SQL Server 2005
installed, and are trying to write a client in Visual Studio 2005 using the
.N
Andrew,
I tried it with normal ,Net imagelist, and that failed. I tried the
IPictureDisp trick, because that is what we have to do (via AxHost) to
put bitmap images on Outlook buttons so wondered if it was the same COM
issue.
Also, I'm creating the imagelist on the fly in the constructor of the
c
IPictureDisp cannot be marshaled between COM apartments - I'll bet it
has something to do with that
Andrew
-Original Message-
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Dean Cleaver
Sent: Tuesday, August 08, 2006 9:16 PM
To: ADVANCED-DOTNET@DISCUSS.D
10 matches
Mail list logo