[opendemo-devel] ring-buffer is ready
Status: Beta
Brought to you by:
girlich
From: Dr. U. G. <Uwe...@ph...> - 2002-01-11 21:53:36
|
Hello! I finally found the small bug in my ring-buffer code and checked in a (hopefully) working version. Please try it out and do some performance tests. I have to admit, that it did not really feel any faster. opendemo/src/libs/od_filebuf.h 1.3 -> 1.4 opendemo/src/libs/od_filebuf.c 1.3 -> 1.4 fbShrink() is now useless, as fbSkip() alone advances the read pointer (tail) and makes the ring buffer smaller. I did not implement any resizing to conserve memory: if an fbGrow() request is too big, the ring buffer grows accordingly with mbResize() but if we have nothing more to read from the buffer, it won't reduce its memory buffer size. All this odRealloc() stuff was really too much. Bye, Uwe |