MAXSTRINGLEN applied to printf()?

Josh Stone jistone@redhat.com
Thu Aug 9 16:56:00 GMT 2012


On 08/08/2012 09:01 PM, halcyonic@gmail.com wrote:
> If I try to printf() more than MAXSTRINGLEN characters without
> outputting a newline, does that mean I'm exceeding the string length
> limit?  I.e., is just a normal string serving as the printf buffer,
> and all the normal rules about strings apply to it?  (I was trying to
> get around the string length limits by issuing multiple printf()'s,
> but that seems to be backfiring...)

As long as you're not using intermediate strings, MAXSTRINGLEN should
not limit you.  There is a different limit STP_BUFFER_SIZE which is 8192
bytes, but I believe even that is for each individual printf call.

As before, examples of what you're trying and the result would be helpful.


Josh



More information about the Systemtap mailing list