Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » BlockStream::_Get does not buffer data (current svn version)
Re: BlockStream::_Get does not buffer data (current svn version) [message #15443 is a reply to message #15442] Wed, 23 April 2008 22:39 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14266
Registered: November 2005
Ultimate Member
hans wrote on Wed, 23 April 2008 16:23

In the function

dword BlockStream::_Get(void *data, dword size)

the call to SyncPage resets the read buffer, so the normal Get() functions of Stream are not benefit from buffering.




Thanks, correct.

Probably the correct fix is to call Term_():

	if(pg0 == pg1) {
		SyncPage();
		memcpy(data, buffer + pos0 - pos, size);
		ptr = buffer + pos1 - pos;
		_Term();
	}


(Calling Term_ should be OK at any time..).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: GetHWND() always returns NULL?
Next Topic: Convenient work with options/properties
Goto Forum:
  


Current Time: Sat Jul 19 03:34:52 CEST 2025

Total time taken to generate the page: 0.03819 seconds