davy@RIACS.EDU (05/02/89)
I have an application which will be putting data into one of the server's cut buffers (not selections). Because the data may be large, I want to be able to determine whether the data will fit before trying to put it into the buffer. Is there a way to ask the server how much data it can hold in a cut buffer? Or is the only limit how much memory can be malloc'ed (or equivalent)? Thanks, Dave Curry
dshr@SUN.COM (David Rosenthal) (05/02/89)
> I have an application which will be putting data into one of the server's > cut buffers (not selections). Because the data may be large, I want to > be able to determine whether the data will fit before trying to put it > into the buffer. > There are many reasons why you are in general better to use selections than cutbuffers. > Is there a way to ask the server how much data it can hold in a cut buffer? > Or is the only limit how much memory can be malloc'ed (or equivalent)? > One of these reasons is that putting large amounts of data into server properties is a bad idea. There is no limit to the amount that can be put into properties other than the amount of memory the server can malloc. There is no way to find out how much this limit is, because even if you could get a number there is no reason to believe that it would still be valid by the time you got around to using it. In general, it is better to put a reference to the data (such as a file name) into the property and use some more efficient data transfer mechanism (such as NFS). If you must communicate large amounts of data via the server, use the selection mechanism. There is a way of using selection properties (the INCR mechanism) to transfer large amounts of data while limiting the consumption of server memory. For details, see the Inter-Client Communciation Conventions Manual. David.
rws@EXPO.LCS.MIT.EDU (05/02/89)
Is there a way to ask the server how much data it can hold in a cut buffer? No. Or is the only limit how much memory can be malloc'ed (or equivalent)? Usually.