[comp.windows.x] When to use XSync

sandy@garfield.cs.mun.ca (Sandy Walsh) (05/01/91)

Hi there,

I am developing several animation programs for X, and experience a strange
problem. When making a lot of calls to XCopyArea, XCopyPlane, or creating
a lot of large filled polygons, the memory usage of the process grows and
grows until the process dies. The program is not memory allocation, since
I do not alloc any ram ... just make calls to XCopyArea, etc. I have
fixed the problem by making a call to XSync() after each intensive 
operation.

My question is: Some of my other test programs still grow, I am now wondering 
when I should use XSync() and if I am making too many calls to it. I do
not want to just set XSyncronize() ON and forget it, I would rather try
to reduce traffic. 

Any help would be greatly appreciated.
Thanx in advance,
Sandy Walsh

PS> This is on a Decstation 3100 running Ultrix

------------------------------------------------------------------------
| "Vrooom ... What was that?     | Sandy (Books) Walsh      |  /\O  Yee|
|  That was your life, mate.     | Memorial University      |    #\/Haa|
|  Do I get another one?         | St.John's, NF, Canada    |    #__   |
|  Nope, sorry. One's your lot." | Computer Science Dept.   | /\/   \/ |
|   - Basil Fawlty               | sandy@garfield.cs.mun.ca | |||||||| |
------------------------------------------------------------------------