Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/13/06 11:59
Read: times


 
#118217 - Fragmentation problem...
Responding to: ???'s previous message
Thank you for the reply,

Circular buffer would be cool, but as I mentioned my problem is with the fragmentation.
Imagine this situation (the numbers are the packages sizes of bytes in the cyclic buffer g-get pointer, p-put pointer, f-free place):

Now the buffer is full:
5 9 4 5
^
g
^
p

there are 2 timeouts of packages and I clear the first and the third package with size 4 and 5 bytes. So I get 9 bytes free. The next telegram that arrives has 9 bytes, I have 9 bytes free but I am still not able to save it in the buffer.
F 9 F 5
^ _ ^
g _ p

2. Each package if contains valid start and end characters, then do not store without a valid start and on the valid start...

I didn't really underestand your second suggestion according start, end characters.

Each package contains autonomous information for a specific sender. The package contains all the info the receiver needs. I can't have a start or end package, because it's possible that I receive only 1 package all the other are lost.

But I also can't start processing the package until I am not sure that all the repeated package were received (upon timeout), because I would think I received 2x the same package (during processing).

greetings
Attila

List of 21 messages in thread
TopicAuthorDate
Buffer management optimalization            01/01/70 00:00      
   Simple things first ...            01/01/70 00:00      
   You can use circular buffer            01/01/70 00:00      
      Fragmentation problem...            01/01/70 00:00      
         all methods have some problems            01/01/70 00:00      
         Start of package or End of package            01/01/70 00:00      
            Packages explanation            01/01/70 00:00      
               Individual buffers            01/01/70 00:00      
                  Good Idea            01/01/70 00:00      
   New packages            01/01/70 00:00      
      hash table unefective            01/01/70 00:00      
         why keep that many            01/01/70 00:00      
            Reason of 5 or more buffer            01/01/70 00:00      
               Protocol specifics            01/01/70 00:00      
                  One way protocol            01/01/70 00:00      
                     One way protocol            01/01/70 00:00      
                        never            01/01/70 00:00      
                           Definition of need            01/01/70 00:00      
                              Grant, I agree with what you post re thi            01/01/70 00:00      
                        Simply reason why one way transmission            01/01/70 00:00      
                           then why not just do it the easy way            01/01/70 00:00      

Back to Subject List